11

I have an ubuntu 15.10 server which utilizes wpa_supplicant to connect to wireless network profiles created with wpa_passphrase. On a fresh reboot, the first time I call sudo wpa_supplicant -B -i wlp2s0 -c ./MVS (where MVS is the name of a saved profile for a network) I get the output

Successfully initialized wpa_supplicant
Could not read interface p2p-dev-wlp2s0 flags: No such device

but the exit code is zero, and I can confirm that I am in fact connected to the wireless network by running sudo iw wlp2s0 link

However, subsequent calls to wpa_supplicant (for the other profiles or even the same one) yield a more verbose output:

Successfully initialized wpa_supplicant
Could not read interface p2p-dev-wlp2s0 flags: No such device
nl80211: Could not set interface 'p2p-dev-wlp2s0' UP
nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
p2p-dev-wlp2s0: Failed to initialize driver interface
P2P: Failed to enable P2P Device interface

wpa_supplicant still returns an exit code of zero, but the wireless device is most definitely not connected to any network this time. Any advice or thoughts would be greatly appreciated, I don't know how to debug this or fix it.

migrated from serverfault.com May 7 '16 at 19:49

This question came from our site for system and network administrators.

21

I'm embarrassed to say the solution was to kill the already running wpa_supplicant process. The -B argument causes the program to fork into the background, and trying to run it again will fail as long as it is already running. I'm still not sure why it prints that first error message, but it connects to wireless networks without issue.

sudo killall wpa_supplicant

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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