Setting up Wifi with the Command Line on Raspberry Pi

Setting up WiFi in Occidentalis, is also pretty straight forward. You just need to add the name of your wireless network (its SSID) and your password to a configuration file.
Step 1.
Boot the Raspberry Pi without the WiFi adapter plugged in.
Step 2.
Open a Terminal session by clicking on the LXTerminal icon, and enter the following command into it:
sudo nano /etc/network/interfaces
Then
  1. auto lo
  2.  
  3. iface lo inet loopback
  4. iface eth0 inet dhcp
  5.  
  6. allow-hotplug wlan0
  7. auto wlan0
  8.  
  9.  
  10. iface wlan0 inet dhcp
  11. wpa-ssid "ssid"
  12. wpa-psk "password"


If you are using a 'hidden' SSID, try the following code:

  1. auto lo
  2.  
  3. iface lo inet loopback
  4. iface eth0 inet dhcp
  5.  
  6. auto wlan0
  7. allow-hotplug wlan0
  8. iface wlan0 inet dhcp
  9. wpa-scan-ssid 1
  10. wpa-ap-scan 1
  11. wpa-key-mgmt WPA-PSK
  12. wpa-proto RSN WPA
  13. wpa-pairwise CCMP TKIP
  14. wpa-group CCMP TKIP
  15. wpa-ssid "My Secret SSID"
  16. wpa-psk "My SSID PSK"
  17.  
  18. iface default inet dhcp

Step 3.
This opens an editor screen of the wifi configuration file you need to change.
Step 4.
When you have finished press [ctrl]x. This will ask if you want to save the modified files.

Step 5.
Shut down your Raspberry Pi, plug the WiFi adapter in and start it up again. You should find that the Raspberry Pi connects using the WiFi adapter as it boots up.

Comments

Popular posts from this blog

Link3 FTP Server

কেন গবেষণা করব?

Arduino Adventures by Floyd Kelly James and Harold Timmis