Adventures in WiFi

Using wicd-curses

I know of no better way than getting WiFi to connect automatically than using the wonderful wicd-curses package. So, here’s how to do it:

  1. Plug your wifi dongle in. I cannot impress on you enough how important this is 😉
  2. If you’ve not done it already, login as root and install wicd-curses:
    1. apt-get install wicd-curses
  3. Run it. Just type
    1. wicd-curses
  4. You’re given the wicd interface. You probably haven’t got anything showing yet, so do Shift-R to refresh the network scan.
  5. Use the arrow keys to highlight your router and press –>
  6. Go down and hit space when you reach the Automatic connection checkbox.
  7. Then, go down to the password field and put your wifi router password in.
  8. Hit F10 to save the settings and you’ll go back to the first screen.
  9. Highlight your router if it’s not already and hit shift-C to connect.
  10. Hopefully, this will connect you. If not, check your password!
  11. Do shift-Q to come out of wicd.
  12. Type ifconfig -a and you should see your wlan0 connected to your router and your ip address displayed.
The beauty of doing it like this rather than via the command line is that wicd runs as a daemon when your Pi starts up and will automatically connect to the network without you doing anything else.
NB: You may have to wait a minute or so for it to connect.

5 comments for “Adventures in WiFi

  1. Gazman
    1 August 2012 at 11:11 am

    >I've also found that if you're using WPA, you need to set the correct date and time, otherwise it will fail at password/PSK verification.

  2. Michael Horne
    1 August 2012 at 11:41 am

    >Really? I didn't find that… though I think I'm using WPA2, so that might be the difference.

  3. Gazman
    1 August 2012 at 11:49 am

    >Yeah, took me ages to figure it out until I came across a 'normal linux' post about wireless network configuration and the need to have accurate date/time. Sure enough, connect LAN to get ntpd to set the date, disconnect the LAN and the WLAN comes up a treat. I'm going to put a RTC on the Pi using this tutorial as a guide (I might also try using WPA2 – thanks for the tip!):

    http://www.element14.com/community/groups/raspberry-pi/blog/2012/07/19/what-time-is-it-adding-a-rtc-to-the-raspberry-pi-via-i2c

  4. delcampo
    5 January 2013 at 7:06 pm

    Nice guide, especially for us Linux neophytes! I have a couple of questions:

    1) Do you have to take special care to notice the encryption type from the main screen (WEP, WPA, etc.), and make sure that in each routers settings that is set up correctly?
    2) When you are adjusting the settings for each router, do you leave the “Use DHCP Hostname” without an “X”?

    • 5 January 2013 at 9:57 pm

      Thanks for commenting 🙂 Hopefully I understand what you mean by your questions
      1. You should match the settings to what you know your router is set to. Normally, it’s got a label on the router somewhere that tells you.
      2. You just leave it as whatever the default is, yes. (Well, I did anyway!)

Leave a Reply

Your email address will not be published. Required fields are marked *