Get Your Free Subscription By Email:

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

Comments

How the hell do I sudo apt-get update/install without the freaking internet in the first place? Useless tutorial.

The tutorial is not useless, you are supposed to have your RPi connected to a Ethernet connection to get it configured for WiFi.
This is the way you do it, if you have any other method pls. do share....

are you retarded?

No, he's not. But clearly you are.
Thinking that the RaspberryPi might be a little too advanced for you.

You could put the packages on a flash drive if you really wanted to, but yeah a hard wired connection is definitely the best choice

Hello, great tutorial. You wouldn't happen to know how to make wpa_gui launch automatically at startup? I'm running the raspi headless and want it to automatically launch wifi and connect to my saved connection. Thanks

wpa_gui is just an graphical frontend to configure wpa_supplicant, which means you dont need to run it at boot as wpa_supplicant will take care of that automatically on every boot. you can look at some other WiFi related tutorials at - http://www.megaleecher.net/taxonomy/term/13360

http://raspberrypi.org/phpBB3/viewtopic.php?f=26&t=34127&p=295510#p295510

This post describes a simple way (which can surely be improved) to get a Raspi to start up with a wifi connection the first time you put in an sd card without manual entries.

Eg suitable approach to distribute devices to civilians.

Have done the first part of this tutorial - without any errors anywhere in the process. When I run wpa_gui there are no adaptors in the dropdown so there is nothing to configure. Gui says: "Could not get status from wpa_supplicant".

What now? I've looked at other "How to's" but none has fixed my problem.

Fresh OS image downloaded and set up.

This means your WiFi is not getting detected by the OS, try using a powered USB Hub and manually installing drivers for your wifi.

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.