I've had some problems setting up wifi using wpa_supplicant but would prefer to use it so I set up the pi to auto associated with networks i will likely be around.

Initially I used the GUI to connect, then I tried wpa-roam in the interfaces file which seemed to work fine. However that stopped working. The last configuration that worked for me was entering the ssid and psk directly into the interfaces file which isn't ideal for associating to various networks based on where I am.

The current symptoms/trouble shoot status:

raspberry pi 3

Linux retropi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux

Upon boot the networking icon in top right shows it is trying to connect and has even said "wlan0 associated with " and tries and fails a few times to connect. Between attempts clicking on the icon returns "no wireless interfaces found" and leaving the cursor over it brings up a bubble that says "wlan0 : STOPPED".

ifconfig only returns eth0 and lo.

ifconfig -a shows wlan0

sudo service networking restart followed by ifconfig will then return eth0, lo, wlan0

sudo ifup wlan0 returns - 'wpa_supplicant: /sbin/wpa_supplicant daemon failed to start'

sudo ifdown wlan0 returns 'ifdown: interface wlan0 not configured'

sudo iwlist wlan0 scan returns the various SSIDs that are around my home.

running wicd-curses shows the networks and everything and i can attempt to connect but it fails.

before I dump the /etc/networking/interfaces file and my wpa_supplicant.conf I'll put in a few other odd behaviors

Sometimes when starting up - even with an ethernet cable plugged in - I have to run sudo dhclient -v eth0 to get an ethernet connection. running the same command swapping for wlan0 doesn't work.

my interfaces file is:

source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

wpa_supplicant.conf is

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
country=US

network={
    ssid="mySSID"
    psk="mypass"
    key_mgmt=WPA-PSK
}

dmesg | grep wlan0 returns

[    5.523106] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[    5.528514] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   15.******] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   16.******] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   28.******] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

and then repeats like that sometimes 'link not ready' happens three times between the 'link becomes ready' and sometimes four times.


I'm confused I feel like my setup should work I'm not certain what is amiss. If anyone has any ideas I would appreciate it. Also if you need more info please ask.

thanks

  • You mention "running wicd-curses"; I don't use retropi, but understand it is built on Raspbian, which uses dhcpcd NOT wicd-curses. There are many different ways of running networking, but they are not compatible - you have to pick one, and stick to it. – Milliways Jan 10 '17 at 23:09
  • That is true - good idea. When I have access to it I will remove wicd-curses. I tried wicd-curses after running into issues with dhcpcd (the default for Raspbian) but I'm hopeful I initially made an error in the command line set up (seems likely to me) and then tried to switch to curses out of impatience which probably jumbled things in a way I didn't anticipate. Thank you for your response. – ekstasis Jan 19 '17 at 23:56
  • I solved it but didn't touch wicd-curses . I don't know why this worked but i found a post that mentioned encrypting the password with the command sudo wpa_passphrase 'yourSSID' 'yourPassword' and copy and pasting the result in wpa_supplicant.conf file. I've never had to do this before but it works - I'll mark this as solved. Here is the post on trouble shooting wifi issues – ekstasis Feb 4 '17 at 3:58

I solved it but didn't touch wicd-curses.

I don't know why this worked but i found a post related to trouble shooting that seems helpful though i had done everything in the post except that mentioned encrypting the passphrase with the command sudo wpa_passphrase 'yourSSID' 'yourPassword' and copy and pasting the result in wpa_supplicant.conf file.

so you type:

sudo wpa_passphrase "mySSID" "myPASSPHRASE"

and the result is (for example):

network={ ssid="mySSID" #psk="myPASSPHRASE" psk=b04b5f9f0f161db17816f6c29029662630c22450ec0fcedacd070a19c684cbf3 }

here is the post that had the trouble shooting steps in case someone is interested

  • Maybe because you get out the key_mgmt=WPA-PSK of the configuration – aurelien Oct 19 '17 at 16:13
  • so very strange. confirmed. – Shaun Wilson May 11 at 7:19

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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