Wednesday, July 31, 2013

Wireless networks are not being seen by network manager

Summary: In this article I am going to show you the solution of the problem: wireless networks are not being seen by network manager even if wireless card drivers are installed.

Yesterday, I reinstalled Linux 1.14 Nadia in my pc. After that I installed my wireless card driver which is Broadcom Corporation BCM4312. I learned its name and version from lspci command. lspci is a command on Unix-like operating systems that prints detailed information about all PCI buses and devices in the system. After that I installed the driver using method 1 which is I explained earlier in that post.

Everything was ok,  I used the internet connection for hours, but after that I encountered a new problem. The wireless was working well but it couldn't see any wireless connections. I thought, I can use error debugging techniques in linux to find the actual problem.

I am going to explain Error debugging techniques in linux at an article in the next days. 

So, I opened a terminal and I typed in:

  
syslog is a .txt file which includes all errors, messages and notifications coming from apps, softwares etc. And the most beautiful property is we can view at  this moment what is going on about an application or software. Once you typed in above command it will show the new errors or messages too. 
When I typed in that command , and view messages, I clicked the icon at the right bottom of desktop and then >>Connect to Hidden Wireless Network , I choosed an past connection which I used before. And click connect. My purpose was to interact with network manager and see if it has a problem if it is see in the syslog. When I did this I saw an input to syslog which is shown below:



As you see in the last rows, it is saying eth1 is not active.(inactive) We found the actual problem!. Now we are going to solve it.. I typed the following commands into terminal to stop and restart again eth1 interface.



This solved my problem. I hope it solves your problem too..

If you have any question or need some help, leave a comment below.
Read More

Sunday, July 28, 2013

Dice Simulation with C or C++

I wanted to model the dice simulation using C or C++. You can see the codes in the following.


Read More

C veya C++ ile Zar Atma Simulasyonu

Bu programımda zar atmayı C ile modellemek istedim. Program kodlarını aşağıda görebilirsiniz.


Read More

Thursday, July 25, 2013

CPU Sıcaklık Alarmı Sistemi



Merhabalar, bu yazımda linux kernel ve linux shell in verdiği harika avantajlardan faydalanarak yaptığım CPU Sıcaklık Alarmı Sistemini anlatmak istedim.

Linux un bize sağladığı en büyük avantajlardan biri kolaylıkla hardware bileşenlerine ulaşabilmemizdir. Hardware ile iletişim şu şekilde gerçekleşir :

1. Kullanıcı isteklerini kodlar halinde yazar.
2. Shell bu kodları linux kernel in anlayabileceği dile çevirir.
3. Kernel ise hardware ile shell arasındaki iletişimi sağlayan bir nevi arayüz diyebileceğimiz bir sistemdir. Kernel bu istekleri hardware bileşenlerine iletir.

Bu basit adımları ve daha fazlasını şema olarak aşağıdaki resimden anlayabilirsiniz..

Resimden görüldüğü gibi linuxtaki uygulamalarda çalışırken önce shell ve user ile iletişime geçerler. Daha sonra shell uygulamanın isteklerini kernel e anladığı dilde iletir. Kernel de bu istekleri hardware bileşenlerine iletir. 

Düşündüm ki madem böyle o zaman:

1. CPU nun sıcaklığı için önce cpu nun sıcaklığını ölçen bir hardware bileşenimiz olan sensörlere ulaşmam lazım. Linux ta bu işi yapan basit komut : 'acpi -t' komutudur.
2. Sensors komutu şu şekilde bir çıktı verecektir: 
Thermal 0: ok, 46.0 degrees C
Buradaki 46.0 değeri cpu nun santigrat cinsinden sıcaklığıdır. 
3. Bu cevapta benim ihtiyacım olan sadece 46.0 değeridir. Bu değeri bu satırdan çekmek için ise şu komutu kullandım: awk '{print $4}'.. Herhangi bir linux dağıtımı kullanıyorsunuz, illa ki awk ı duymuşsunuzdur. Awk dilleri ya da yazıları scan ve process etme pattern idir. Benim bu adımda yaptığım gibi.( 46.0 değerini şu cevaptan çektik>>Thermal 0: ok, 46.0 degrees C)
4. Daha sonraki adımda kendi belirleyeceğim bir değerle cpu sıcaklığını karşılaştırıp, bir alarm zili çaldırmak istedim. (Eğer cpu sıcaklığı benim belirlediğim değerden yüksek ise.). Bu basit karar verme bloku için tabiki 'if else fi ' blokları yardımımıza koşacaktır. 
5. Dördüncü adımda bir alarm zili çaldırmak istediğimi söylemiştim. Bunu sağlamak için sox paketini kullandım. Sox paketindeki play komutu .wav vb. dosyaları çalıştırmamızı sağlar.

Anlattığım bu adımları gerçekleştirdiğim scripti aşağıda görebilirsiniz. Script doğru bir şekilde çalışıyor..


 Herhangi bir sorunuz ya da yardıma ihtiyacınız varsa, aşağıya yorum bırakabilirsiniz.
 Yazıyı beğendiyseniz,  beğen butonlarını kullanarak bloguma destek verebilirsiniz.




Read More

Tuesday, July 23, 2013

Dictionary With Python

Python is a fast programming language as compared to other programming languages such as C, C++, java.. Also it is have a dictionary class which is very useful to create databases. So I thought writing a dictionary app with python would be efficient, fast and easy to build up.

If you don't have python installed in your system, you can see the installation instructions from my an older post installing python. The required steps I have determined are in the following.

Required Steps:
  1. Create the database.
  2. Take an input from the user.
  3. Search the word user entered in the database.
  4. If database has it, write down the corresponding meaning of the word.

This four steps will be enough to make a simple dictionary, but I want to add a new feature which is 'Adding New Word' feature. I mean the user can be able to add new words if the database has not it. By doing this the user will be able to grow up database of the dictionary. In other words, the user will generate his/her own dictionary. So additional steps are give in the following.

Additional Steps:
    1. If database hasn't it, ask to user 'is he/she want to add the new word'.
    2. If yes, take the new word and its meaning from user.
    3. Add it to the database.
    4. Close the Dictionary.
By using to-do list above, I wrote the following script in python. I named it as Mpdictionary. The code is given below:

The Code:
----------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------

Working windows:


If you have any question or need some help, leave a comment below.

Read More

Monday, July 22, 2013

Install Android SDK on Eclipse On Linux Distributions

To start developing Android apps we need to first choose an IDE platform or environment. I recommend Eclipse. It is really good and efficient to develop android apps. I will give the step by step installation of Eclipse and set up it to develop android apps.

Reqired Steps:

1. Open a terminal by typing Ctrl+F2
2. Type 'sudo apt-get install eclipse' enter, enter your password , this will install Eclipse platform.
3.  After installation open Eclipse from installed apps. When it is opening it will ask you workspace folder which is contains the application folders, choose or create as you want.

Now it is time to get Android SDK:

4. There are versions for linux distributions get the latest and convenient version for your system from: http://developer.android.com/sdk/index.html
The Android SDK is a compressed folder. Download and extract the contents of this
file to a convenient place on your computer. You should install the SDK where you usually put your
development tools. Open SDK file you will see a file as tools, in that file click android script and click run to run it. This will install Android SDK.

Both Eclipse and the Android SDK are installed. It's time to install the Eclipse plug-in
to take advantage of the Eclipse environment.

Obtaining and Installing the Eclipse plug-in

1. Run the "Find and Install" feature in Eclipse, found under the Help >Software Updates menu.
2. Select the Search for new features to install option.
3. Select New Remote Site. Give this site a name, such as "Android Developer Tools," for example. Use the following URL in the dialog:
https://dl-ssl.google.com/android/eclipse. Please note the HTTPS in the URL. This is a secure download.

4. A new entry is added to the list and is checked by default. Click Finish. The search results display the Android Developer Tools. Select the Developer Tools and click Next.
5. After reviewing and accepting the license agreement, click Next. Note that the license agreement includes a special requirement for use of the Google Maps API.
6. Review and accept the installation location, then click Finish.

The plug-in is now downloaded and installed. The plug-in is not signed (at the time
of writing), so proceed at your own comfort level by clicking on Install All, then
restart Eclipse.

If you have any question, or need some help, leave a comment below.
Read More

Sunday, July 21, 2013

Linux Mint 1.14 Nadia Wireless Problem

I installed Linux Mint 1.14 Nadia a few months ago. Wireless  wasn't working because of the driver was not installed. In some linux mint distributions you can have this problem, nadia is one of them.
Also, in some ubuntu distributions you can have the wireless problem too.
To solve this problem you need to install wireless driver and reboot your computer or restart network services. To doing this there is several methods. Methods are given as follows:

Method 1:

1. Open a terminal by typing ctrl+F2
2. Type lspci and press enter, to specify your chipset, in my pc it is Broadcom
3. Open Software Manager, type 'your chipset' into search box
4. Install wireless driver
5. type sudo service network-manager restart into terminal to restart your network service Problem is solved have fun with your wireless..

-->

Method 2:

1. Open Additional Drivers
2. Select your chipset driver
3. Click apply changes
4. open terminal
5. type 'sudo service network-manager restart' to restart your network service
Problem is solved have fun..

Note: Both of methods are tested, working correctly.

If you have any guestion, or need some help, leave a comment below. 
Read More

Saturday, July 20, 2013

Ubuntu 11.10 waiting up to 60 more seconds for network configuration 'problem'

-->
I upgaded my ubuntu 11.04 Natty to ubuntu 11.10 Oneiric Ocelot a few weeks ago. To handle some issues I have needed to modify /etc/network/interfaces file. After some modifations I get the message:"waiting up to 60 more seconds for network configuration" when booting.
I have found the reason of this is to have any interfaces in /etc/network/interface file as auto. To correct the problem just remove all rows and leave it as default like:



Another solution can be modify the script /etc/init/failsafe.conf>>This script is the script that control configuration of network interfaces when booting and if they are not all configured send the message above to the screen.. So let's take a look at that script:



As we see and understood from the scripts commands: that script is controlling the waiting duration when booting.. The script keeps waiting us totally 111 seconds.. If your system doesn't need to wait  just insert a # character at the beginning of sleep calls or remove these rows. If your system needs to wait, but you don't wanna be wait this much, just change the values as you want.. Problem solved in either ways, but I recommend the first one..

Note: The values of sleep calls in your script may be different than my script, that is because of I have made a modification before in that script..
In my case, I solved my problem with two ways. In the second way the final look of my failsafe.conf script is given in the following:



-->

If you have any question, or need some help leave a comment below..
Read More

Friday, July 19, 2013

Modelling a Digital Communication System using Matlab

I modelled the digital communication system by a simple script. In first, if you haven't installed Matlab in your system yet, you can see my article about installation of matlab on Linux.
A digital telephone converts an analog signal(our voice) to a digital signal before transmission. While the analog signal takes on real number values, the digital signal takes on only a finite set of integer values. We can model these implementation effects and save memory by storing the digital as an integer data type rather than as type double. I did this by writing the script in the following. When I run I got the pics showing the script is nicely working in the below of the script..



See the pics below:

digital_communication_system_figure1

new
Read More

Vodafone Mobile Connect Software in Ubuntu

To install vodafone mobile connect software enter the following commands into terminal:
wget https://forge.betavine.net/frs/download.php/626/vodafone-mobile-connect_2.25.01-1_all.deb
sudo dpkg -i vodafone-mobile-connect_2.25.01-1_all.deb
After the installation you can run the software from Applications->Internet Category. The picture of the program is in the following. Have fun..
See the picture below:

Read More

Android x86 Wifi-Wireless Problem

Hi guys! Nowadays most of the people have a trouble with Android x86 wifi-wireless problem.
To handle this I figured out a solution.
If you haven't tried Android on a pc, you may  wanna see my post about how to install android on pc.

Solution:
Open Android  and press Ctrl+Alt+F1 to open terminal then type the following rows:

netcfg        --to see what you have as connection devices in your computer
                    probably you see lo,eth0 and maybe eth1--
then type
netcfg eth0 up   --to open eth0-- after that type
netcfg setprop net.dns1 8.8.8.8
close the terminal by pressing Ctrl+Alt+F7

And have fun with your net connection.
This solution is worked for a friend. Maybe it will work for you too!.

Read More

Thursday, July 18, 2013

Worldlist Maker with Python

Fistly, if you haven't installed python in your system, you can wanna read my post about installation of python on linux.
Some peoples, especially hackers and that who wanna be a hacker :)  needs wordlistmaker scripts to hack passwords. A wordlistmaker script required to be very fast and very efficient. Because, most wordlists have thousands of words. So I choosed the language as 'Python' due to its speed. As we know, python is faster than C, C++ , java and pascal etc. I wrote the script and it worked perfectly! You can see some photos in the following. If you want my Wordlist Maker, contact me by using my email which is given in the right sidebar..

Watch the video below:



Working windows and photos : 




Click the following picture, see it is nicely working!













Download the Code!

-->

Read More