Raspberry Pi is a mini computer with low budget which provides moderate performance rate. There are immense numbers of gadgets which serves the dual function of a controller as well as processor. They endue outrageous amount of efficiency. But we know that greater efficiency will always point towards greater price tag. Hence these highly equipped gadgets provide work at a higher efficiency but they are not at all cost efficient. If you want to setup a device whose performance scale will be low and will support the basic functions. Then always opt for the Raspberry Pi model. It gives you moderate level efficiency but comparatively at a very low price. Raspberry Pi had two models. The model A is not equipped with any internet connection. But the latest model B is pre-equipped with an Ethernet cable wire which provides speed of around 100 Mbps.
However, you can equip both the models with a WiFi connection which will give an ultimate solution to wireless network and increase the efficiency of your machine. There are three different techniques for setting-up of WiFi in your Raspberry Pi. Let us avail the processes behind the techniques and find out which is suitable.
This is the easiest way to acquire WiFi connection in the Raspberry Pi. This method is suitable for both the models and will give undoubtedly high performance. Using a dongle in any kind of system will prove to be cost efficient and tassel free.
Setting up a dongle in a Raspberry Pi will be achieved by following few simple steps. This is done by choosing a Raspbian supported dongle, then plugging it up in the Raspberry pi board and follow few simple configuration steps. After which you will have the WiFi set-up on your RPi board.
Selecting the correct USB dongle or adapter is the primary aim before setting up the connection. The adapter must be a Raspbian supporter. So the Realtek RTL8188CUS chip based adapter is preferred because it supports Raspbian models and for booting it no extra configuration is required. Hence before arriving into a conclusion for buying the right adapter one should have a complete research on it.
The preferred dongle is then plugged in the RPi board and boot-up the board. Now you need to check whether the USB adapter has been identified by the system. It can be check by simply typing the below letters
ifconfig
For Ethernet connection the list will show- eth0 For Loop back device the list will show- lo For wireless adapter the list will show- wlan0
Now you can configure the USB adapter which you are using by entering the following command
sudo lsusb
The connection list will show the name of the USB chip you have used.
Another easy method of setting up the WiFi network on the Raspberry Pi is by creating the icon on the desktop. This is possible if it is a Raspbian desktop. Connecting to any wireless network for a Raspbian desktop is much easier. Following few easy steps, the wireless network will be easily set up in RPi
Step1: To start the configuration process, click on the “WiFi Config” icon which exists on a Raspbian desktop. After which the name of the plugged USB adapter will be visible on the “Adapter” field and the “Network” field will show empty if no wireless network is installed before hand.
Step2: Click on the “Scan” button which will be available on the “Scan Result” window. Then list of wireless networks will pop-up on the screen from where you need to choose the one you are using.
Step3: This step involves verifying the selected network by clicking on “Authentication” and “Encryption” icons which will be seen on the network verification window. Now enter the password in “PSK” field and click add.
Step4: Close the “Scan Result” window and the configuration set-up will immediately connect to the new wireless network.
Hence carrying out the same procedure, you can easily configure more network options in your system. Clicking on the “Network” button, you can connect to the desired network. Again clicking on “Managed Network” button, you can easily edit the network settings.
On the other hand, your desktop may be a non-Raspbian. In this case also the WiFi network can be easily configured on your Raspberry Pi board by using the Command Line. The Raspberry Pi latest model arrives with a package of pre-installed files. But it is possible that the files are not correctly configured. Then the commands of the files need to be run in order to configure them by using the given command
sudo apt-get install wpasupplicant wireless-tools
While setting up general networks, “/etc/network/interfaces” command is used.
While setting up WiFi network, “/etc/wpa_supplicant/wpa_supplicant.conf” command is used.
Step1: In this step edit the “interfaces” by following the command
sudo nano /etc/network/interfaces
Step2: The section containing wlan0 must be visible at the end of the file which will read as below
“allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp”
Note: Do not change the command lines for Loop Back device and Ethernet Port.
Step3: Find the current wireless networks by using the command
sudo iwlist wlan0 scan
Step4: If innumerable informations pop-up on the screen then use the following command in order to search for your suitable field. Let us consider searching for ESSID.
sudo iwlist wlan0 scan | grep ESSID
Step5: After selecting the right network, it needs to be authenticated. This is done by using the command
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
However, the starting two lines must look something like this
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
Step6: This step is where you are supposed to encrypt the network in the following way
network={ ssid="YourSSID" psk="password" key_mgmt=WPA-PSK }
Step7: The router may be previously configured by using WEP and then the encryption of the network will be shown in the following way
network={ ssid="YourSSID" wep_key0="password12345" key_mgmt=NONE }
For advance WiFi connections, the network information will provide the following list
-proto- Protocol Type- RSN for WPA2 and WPA for WPA1 -pairwise- CCMP for WPA2 or TKIP for WPA1 -auth_alg- Authentication algorithm. It opens for WPA1 as well asWPA2.
Step8: Now press “CTRL+X” to exit from the file and “Y” to save. Finally press “ENTER” when prompts.
Step9: The last and the final step involves rebooting the Raspberry Pi which is done by following the command
sudo reboot
For checking the network configurations for wireless adapter, follow “iwconfig”.
For checking the network configurations for wireless connection, follow “ifconfig”.