I have 2 identical rpi 3 devices. Both are running the same version of OS, namely "stretch" version 9 (from the same source). They have slightly diverged via upgrades and updates.

On one I can use wifi-no problem. On the other I cannot.

All configurations files are identical (as far as I can tell). In particular, my wpa_supplicant.conf looks like below.

There are two anomalies I've detected on the problematic pi:

  1. After every reboot ps -e | grep wpa lists two processes called "wpa_supplicant", while on the "good" pi only 1 is listed.
  2. The ssid, I'm trying to connect to, is indeed listed when I click the icon on the toolbar. However, despite the fact that an entry exists in wpa_supplicant.conf, I get prompted and asked to enter the "Pre Shared Key", which I understand is the password. I notice that once I enter it, the file wpa_supplicant.conf is overridden, with the same content it had before.

In addition, I've installed wpa_gui. It provides some more information in (what is referred to as) the event history of the tool. First, by default, the adapter is set to "p2p-dev-wlan0". So, I switch to wlan0. Then, I get:

ctrl-event-ssid-reenebled id=0 ssid="my-ssid"
trying to associate with <some numbers> (sside="my-ssid" freq=...)
ctrl-event-assoc-reject status code=16
ctrl-event-ssid-temp-disabled id=0 ssid="my-ssid" auth_failure

and my wpa_supplicant.conf:

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


Any help is appriciated...

  • Try removing constraints to see if that allows connection, then add back in afterwards if necessary. I'd remove auth_alg, pairwise and proto... Commented Nov 27, 2017 at 22:33
  • Unless you provide more detail about how you configured them, and why it stopped no one can answer. Adding inappropriate software like wpa_gui will not help.
    – Milliways
    Commented Nov 27, 2017 at 22:40
  • I've tried removing all these constraints. (These were my first attempts.) Wifi has never worked on this pi. The only thing I've done as far as configuration of wifi is concerned is edit wpa_supplicant.conf. I'll be happy to provide more specific info....
    – Efi Fogel
    Commented Nov 28, 2017 at 6:38
  • By now I've formated a new SD card with a fresh image and placed it in a 3rd pi 3. I've wired it to the web and ran sudo apt-get update and sudo apt-get upgrade. Then, I've unplugged the Ethernet wire and used the standard gui to get Wifi. It didn't work. I've verified that an entry is generated in wpa_supplicant.conf. Nevertheless, I get prompted with "Pre Shared Key" again and again.
    – Efi Fogel
    Commented Nov 28, 2017 at 8:13
  • 2
    Silly question maybe... but... does the "working" miniSD card function correctly and the same if placed in each of the three RPi3 units you have? Commented Dec 3, 2017 at 3:43

4 Answers 4


wpa supplicant is such a pain in the back. They made it so difficult to connect to WiFi and then re-connection does not work either.. or setting it up is really weird.

It may take a little bit more space on your card but I love using wicd-curses.

sudo apt-get install wicd-curses

start it up

enter image description here

If you get a message saying no networks detected press P (must be capital so use [SHIFT]p) and type in wlan0 in the wireless interface field and press F10 to save.

  1. R to refresh the list.
  2. Use the cursors on the keyboard to navigate up and down the list
  3. Press right to configure the wireless connection
  4. Press down a few times and check "Automatically connect to this network"
  5. Press down a few times again and type in your password in the key field
  6. Press F10 to save

enter image description here

You might have to press C to connect to the access point. If you were wired that will most likely kill the LAN interface and bring up wireless.

It is also manages the connection so it will reconnect to any configured wireless access points if it drops out for whatever reason.

I tested plugging out the WiFi adapter and plugging it back in. It takes about 60~90 seconds but it will connect back to WiFi (I think the LAN must be unplugged though)

Hope it helps!

  • Apparently wicd-curses does not run on RPI 3 running 'stretch'. I get the error message from Python: UnboundLocalError: local variable 'lc' referenced before assignment
    – Efi Fogel
    Commented Dec 12, 2017 at 21:02
  • Probably Python dependency issue.. since it uses Python to manage everything.. (and the message comes from Python) You using Python 2 or Python 3??
    – Piotr Kula
    Commented Dec 13, 2017 at 11:42
  • Python 2.7.13. I only ran spt-get update & upgrade and rpi-update on stretch.
    – Efi Fogel
    Commented Dec 14, 2017 at 17:29

Is the image a desktop image? If so connect your Pi to your router and find the IP address of it on the routers webpage. Then ssh into it. Enable VNC in raspi-config. Download tight vnc onto your computer and use it to connect to wifi.

  • It's s desktop image, The pi is wired to the router. I know it's IP address. I actually run a vnc server on it. All this has nothing to do with the fact that wifi doesn't work...
    – Efi Fogel
    Commented Nov 28, 2017 at 6:30
  • If you can't turn on wifi from desktop over VNC then you might have a faulty board. You can always ask for a replacement. Commented Nov 28, 2017 at 15:57
  • I don't follow. My rpi is directly connected to a monitor, a keyboard, and a mouse, and if I please, I also wire it to the Internet. What does VNC add? Besides, I'm pretty sure it's the software and not the hardware, because I observe the same symptom on 2 rpi's.
    – Efi Fogel
    Commented Nov 29, 2017 at 12:04
  • Ok, in desktop mode there is a wifi symbol at the top of the screen after you are looking at your desktop. Since you are using a raspberry pi 3, it comes preinstalled with wifi and Bluetooth. Watch this video (he is using an older version of raspberry pi, the pi 2) youtube.com/watch?v=7cQrNl0QVFA Commented Nov 29, 2017 at 14:35
  • VNC is like a desktop but, it can be accessed from any were in the world. realvnc.com/en Commented Nov 29, 2017 at 15:26

I am dubious of the fact that there are 2 copies of wpa_supplicant showing up. This usually means that you have either configured your device to talk to 2 SSIDs, or, you have some duplication of configurations somewhere in your networking setup.

Also, I noticed some settings in your network section of the wpa_supplicant.conf file that might not be needed, and could be causing issues. You might want to try removing all of the settings in that key except for your ssid and psk, making it look like this:

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


Most wpa_supplicant settings have sane defaults. Sometimes the extra settings can cause issues unless you specifically have needs for them.

Let us know if this helps!

  • You can ignore the fact that I have 2 copies of wpa_supplicant running. I think it happened because I killed and restarted the process manually (perhaps several times). As I've mentioned in a comment above, I formated 2 new SD cards with fresh images and placed them on 2 new rpi 3 devices, resp. Wifi does not work on either. I've tried all combinations of parameters in the conf. file. (I've started with the simple one that you suggest.)
    – Efi Fogel
    Commented Dec 7, 2017 at 7:46

If you've 'cloned' one SD image from another you may have a problem with your /etc/udev/rules.d/70-persistent-net.rules file which is specific to the hardware.

You can rename the file to .....rules.old or simply delete:

sudo rm -f /etc/udev/rules.d/70-persistent-net.rules

This would resolve the issue.

  • That's good to know, but it's not it. I'm using now a fresh image.
    – Efi Fogel
    Commented Dec 12, 2017 at 21:06

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.