Subsequent calls to wpa_supplicant fail - can't connect to wifi

24,521

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
Share:
24,521

Related videos on Youtube

bkane521
Author by

bkane521

Updated on September 18, 2022

Comments

  • bkane521
    bkane521 over 1 year

    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.