1

This is using the latest Raspbian Stretch release dated 2018-06-27, Linux kernel 4.14 on a RPi 3 B+. I will note that this works perfectly fine on Raspbian Jessie, linux kernel 4.9, on either a RPI 3 B or B+.

I am able to switch Wifi networks using the on-board WiFi by modifying the ssid and psk in wpa_supplicant.conf and then executing wpa_cli reconfigure. When using a USB WiFi dongle though this does not work. Opening up interactive mode on the wpa_cli shows the following message:

<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with 2c:fd:a1:63:4d:28 (SSID='my ssid' freq=2457 MHz)
<3>Association request to the driver failed

I have tried multiple USB WiFi dongles but none of them work, though they all seem to use the RTL8192CU chipset so I am guessing that is the issue but it must be specific to the driver used in Raspbian Stretch. I am not very experienced with kernel modules so I have not been able to investigate much further.

Would it possible to use the Jessie driver in Stretch? Or does anyone have any other ideas of what might be causing this or ways to resolve?

My ultimate goal is to be able to disable the interface and then bring it back up when I want to connect to WiFi. So far everything I have tried results in the error message mentioned above, whether the interface is brought up/down with ipconfig, ip, or when restarting services.

EDIT: I was able to get it working by reloading the driver. Not the best solution but its better than nothing I suppose...

rmmod 8192cu
modprobe 8192cu
  • I ran into the same issue. On reboot the USB WiFi comes up fine and associates with my network. If I try to switch networks via wpa_cli -i wlan0 select_network <id> I get the same error as you -- Association request to the driver failed. Same thing if I systemctl restart wpa_supplicant@wlan0. Thanks for the modprobe tip... that seems to be working, though I wish there was a better way. – Mike Fischer Oct 24 '18 at 23:16
0

Editing wpa_supplicant.conf seems an unusual way of switching networks; it is possible to have multiple networks defined in wpa_supplicant.conf.

Raspbian Stretch (by default) DOES NOT use the old style wpa_supplicant - dhcpcd has its own hook to call wpa_supplicant.

Try restarting dhcpcd sudo systemctl restart dhcpcd

  • This is being used in a mobile project and I'd like to be able to be able to bring down the interface entirely until its needed but running ifconfig wlan1 down && ifconfig wlan1 up results in the same "Association request to the driver failed" error message, as does restarting dhcpcd. – Pathead Aug 15 '18 at 16:48
  • 1
    @PatrickDoyle Maybe you should edit your question to explain what you are trying to achieve. ifconfig is deprecated and not used by default in current Raspbian. – Milliways Aug 15 '18 at 18:15
  • I updated the question. I tried ip link set wlan1 up/down and encounter the same issue. – Pathead Aug 15 '18 at 22:01

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.