Friday, November 16, 2012

Easiest method to setup Wi-Fi connectivity on Raspberry Pi

After initial setup of the Raspberry Pi, it's time for an internet connection. While using Internet over Ethernet is just plug-n-play business on Raspberry Pi, setting-up an Wireless connection takes a little more effort.
To get started with WiFi, first we need to connect an supported USB WiFi dongle to the Pi. Make sure you are using an Powered USB Hub (shown in the picture below) as Raspberry Pi is not able to reliable power multiple USB devices, follow the instructions next to configure your WiFi dongle on the Pi.
Raspberry Pi WiFi Connection Setup
I used my Sony Bravia USB WiFi dongle UWA-BR100 and it got connected within minutes after configuring as below.
We need to update our Raspberry Pi to the latest version of wheezy-raspbian image and install WiFi Manager Utility wpa_gui to get things done as follows :
  1. First update your wheezy-raspbian installation to the latest version by using the following command in terminal.
  2. sudo apt-get update && sudo apt-get install raspberrypi* raspi-config
  3. Once updated, use the following command to install graphical WiFi connection manager wpa_gui.
  4. sudo apt-get install wpagui
  5. Now, edit /etc/network/interfaces file using sudo nano
    /etc/network/interfaces
    and append the following to it.
  6. allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp
  7. Now create a new file /etc/wpa_supplicant/wpa_supplicant.conf with the following contents:
  8. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
  9. Now use following commands for proper permissions :

  10. sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
    sudo adduser pi netdev
  11. You can now launch wpa_gui from /usr/share/applications/wpa_gui.desktop (Make a shortcut to desktop using cp /usr/share/applications/wpa_gui.desktop ~/Desktop)
  12. From now on you can use this nifty graphical WiFi connection manager on Raspberry Pi to configure your WiFi access point settings as shown below.
  13. wpa_gui
    wpa_gui
    wpa_gui
    wpa_gui

No comments:

Post a Comment