I've bought a nano wifi adapter at modmypi.com (this one).

It works, I checked it in a raspbmc configuration (I used raspbmc to configure it there).

Now I'm back at my wheezy distro, and I can't get it to work.

When I do a ifconfig it's there (see below).

The help page on modmypi.com had a script, but when I run that, I get this exception: "Looks like you're using the new 2012-09-18-wheezy-raspbian image. Sorry but the script will not currently set up the wifi on this image. You need to start the GUI using command startx and set it up using WiFi Config. The script will now terminate. Press any key to continue ..."

So now I am in the GUI, and started nm-connection-editor, but it doesn't seem to get an ipaddress.

I've read about this command: dhclient -v wlan0, and this is it's output:

sudo dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:0f:more numbers
Sending on   LPF/wlan0/00:0f:more numbers
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to port 67 interval 5
DHCPDISCOVER on wlan0 to port 67 interval 14
DHCPDISCOVER on wlan0 to port 67 interval 18
DHCPDISCOVER on wlan0 to port 67 interval 11
DHCPDISCOVER on wlan0 to port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

And now I don't know what to do.

This is the ifconfig:

wlan0     Link encap:Ethernet  HWaddr 00:0f:1more numbers
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

iwconfig wlan0:

wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

        pairwise=CCMP TKIP
        group=CCMP TKIP

Executing wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf gives this:

wlan0: Trying to associate with 2a:65:11:f2:ce:97 (SSID='Nerd' freq=2412 MHz)
wlan0: Association request to the driver failed
wlan0: Associated with 2a:65:11:f2:ce:97
wlan0: WPA: Key negotiation completed with 2a:65:11:f2:ce:97 [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 2a:65:11:f2:ce:97 completed (auth) [id=0 id_str=]
wlan0: CTRL-EVENT-DISCONNECTED bssid=2a:65:11:f2:ce:97 reason=0
wlan0: Trying to associate with 90:00:4e:87:c8:cf (SSID='Nerd' freq=2412 MHz)
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-TERMINATING - signal 2 received
wlan0: Trying to associate with 90:00:4e:87:c8:cf (SSID='Nerd' freq=2412 MHz)
wlan0: Association request to the driver failed
  • Have you tried setting up the connection using wpa_gui? That's what I used to get WiFi running.
    – Arne
    Mar 10, 2013 at 9:41
  • Also, output of iwconfig wlan0 would be useful.
    – Arne
    Mar 10, 2013 at 9:42
  • i've added the output of iwconfig wlan0
    – Michel
    Mar 10, 2013 at 14:04
  • i'll try the wpa_gui now
    – Michel
    Mar 10, 2013 at 14:07
  • I get an error: association request to the driver failed in wpa_gui.... I must say i don't know if i have to install any drivers for this device?
    – Michel
    Mar 10, 2013 at 14:33

4 Answers 4


You might have multiple instances of wpa_supplicant running. try

ps ax | grep "wpa_supplicant -B" | grep -v grep
kill {pid of wpa_supplicant}

if that works then you can try this

sudo kill $(pgrep -f "wpa_supplicant -B")
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo rm -r /var/run/wpa_supplicant/*
sudo wpa_supplicant -B -iwlan0 -f/var/log/wpa_supplicant.log -c/etc/wpa_supplicant/wpa_supplicant.conf
sleep 15
sudo dhclient -v -r wlan0
sudo dhclient -v wlan0

and tail the /var/log/wpa_supplicant.log to see what is going on.

wpa_supplicant should run at start up with the default config file. if you want to chage your config file on the fly kill the old process, blow away the /var/run/wpa_supplicant/* directory and start wpa_suplicant with the new config file by using the -c option.

Side note wpa_cli is odd the flags are not followed by a space. for example you want to do

wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf


-c /etc/wpa_supplicant
  • 1
    I had everything configured correctly. Only I couldn't get an IPv4 address from ifconfig wlan0 up. After doing dhclient -v wlan0 it worked like a dream. I have no idea why. Why does my system need this command?
    – atripes
    Jan 19, 2016 at 13:37

I had a bad wifi password, which caused this. Specifically, the "at" symbol and quotation mark are reversed on a UK keyboard, so the "at" symbol in my password came out as a quotation mark, which the config file certainly didn't like. :)

  • Something similar happened to me once; I only figured out the problem after I ran iwlist scan, when I realized that the SSID had an extra space at the end. Sep 1, 2013 at 6:20


i had the same problem logging in with WEP, i resourced a linux web site and scored this page, tried the first one and now im linked via wifi!

  • 1
    Please include the specific solution in your answer in case the link is moved/removed to help future users.
    – Tevo D
    Sep 7, 2013 at 16:32
  • 1
    yeah... including the information would've been nice. the page is dead by now. the glorious wayback machine still has a snapshot of that site though: web.archive.org/web/20130929013742/http://…
    – wullxz
    May 24, 2015 at 21:26

Have you tried powering up the pi untill you have logged in either in a terminal or gui then unplugging and replugging the wifi adapter. Then remove all entries for wireless networks and re-scanning for your network then configuring it. Dont know if it will work for you but it did for me when my adaptor plays up

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.