M HYPE SPLASH
// news

Set wpa_supplicant default driver on startup

By Emma Payne

I am trying to connect a device to the wi-fi and for that I have two dongles: one 2.4GHz and one for 5GHz. However, the 5GHz one uses a specific driver 8812au.

This driver is not compatible with nl80211 driver:

root@pal:~# wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface

However it works with wext driver

root@pal:~# wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface
root@pal:~# wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -Dwext
Successfully initialized wpa_supplicant
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with e4:95:6e:44:4e:d3 (SSID='Protobot5G' freq=5180 MHz)
wlan0: Association request to the driver failed
wlan0: Associated with e4:95:6e:44:4e:d3
wlan0: WPA: Key negotiation completed with e4:95:6e:44:4e:d3 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to e4:95:6e:44:4e:d3 completed [id=0 id_str=]

Note that I can only access the device via the LAN, so I cannot see its status when it has failed to connect, However it connects only when the 2.4Ghz dongle is plugged, regardless of the 5Ghz dongle.

Is it due to the driver, and if yes, how can I set wpa_supplicant to use wext by default?

2 Answers

You can use dhcpcd. It's installed by default on Raspbian (Raspberry Pi).

Simply add a new entry into /etc/dhcpcd.conf. I added this at the end of the file:

interface wlan0
env ifwireless=1
env wpa_supplicant_driver=wext
1

The rtl8812au driver has a lot of issues.
Use the driver from AirCrack-NG instead.

I think this will solve most of your issues.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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