0

I am trying to use wpa_supplicant. I see in wpa_supplicant --help that there are four options for its driver parameter (-D):

drivers:
  nl80211 = Linux nl80211/cfg80211
  wext = Linux wireless extensions (generic)
  wired = Wired Ethernet driver
  none = no driver (RADIUS server/WPS E

I have an Edimax EW-7811UN, a seemingly popular WiFi dongle for Rasp Pis. Since I wasn't sure which driver it has, I tried:

readlink /sys/class/net/wlan4/device/driver

The answer I get:

../../../../../../../bus/usb/drivers/rtl8192cu

Is this wext or nl80211?

I am on RPi 3 with Stretch (but I guess that doesn't change anything).

  • Accessorily, I see that rt18192 is deprecated. Should I replace it? Source: github.com/pvaret/rtl8192cu-fixes – hartmut Dec 3 '18 at 16:31
  • Have you tried letting the system decide? ISTR the 7811UN has been supported OOTB since 2012 and needed no manual changes apart from a standard wpa_supplicant.conf – Dirk Dec 3 '18 at 18:32
2

You are confusing two types of driver. The driver for the firmware (rtl8192cu) of the wifi device has nothing to do with the driver backend of wpa_supplicant (nl80211). Let's explain in detail.

Behind the link you have given it is said:

Make sure to blacklist the older rtl8192cu driver, which some distros seem to load by default otherwise.

Seems Raspbian is one of these distros so you should follow it. Before doing it we have to check that the new rtl8xxxu driver is available. You can do it with:

rpi ~$ sudo modprobe configs
rpi ~$ zcat /proc/config.gz | less

In the pager search for CONFIG_RTL8 and you will find CONFIG_RTL8XXXU=m that means the wanted driver is compiled with the default kernel and available as module. Just try to boot with blacklisted rtl8192cu and look what driver is loaded. Maybe you have explicitly to load rtl8xxxu. I suppose you know how to do it with files in /etc/modprobe.d. But just looking there from a default raspbian image I see:

rpi ~$ ls /etc/modprobe.d/
blacklist-rtl8192cu.conf  blacklist-rtl8xxxu.conf  ipv6.conf

Seems both drivers are already disabled. I don't know why do you see that rtl8192cu is loaded on your RasPi. Just restore blacklist-rtl8192cu.conf and rename blacklist-rtl8xxxu.conf maybe to blacklist-rtl8xxxu.conf~. This should load the new driver rtl8xxxu on boot.

Now to come to the driver backends for wpa_supplicant. Within man wpa_supplicant you will find:

AVAILABLE DRIVERS
[..] Support for each of the driver backends is chosen at wpa_supplicant compile time. For a list of supported driver backends that may be used with the -D option on your system, refer to the help output of wpa_supplicant (wpa_supplicant -h).

wext is the predecessor of nl80211 and mostly only used for backward compatibility. Default is nl80211 and you should use it at the first place with the option -D, for example with:

rpi ~$ sudo /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -Dnl80211,wext -iwlan0 -B

This is the default setting for running wpa_supplicant on Raspbian so you haven't to worry about it.

  • although both drivers are blacklisted in /etc/modprobe.d/ rtl8192cu is loaded. Renaming blacklist-rtl8xxxu.conf has no effect. Any guess how else to activate rtl8xxxu? – jake Dec 7 '18 at 17:46
  • Seems to be an issue with overlays then. Just for testing try to unload and load the drivers by hand with sudo rmmod rtl8192cu and sudo modprobe rtl8xxxu. Maybe you have also to unload/load dependend modules. – Ingo Dec 7 '18 at 18:06
  • Does not work. It kills my access point. I think I’ll just stick to rtl8192cu. Thanks – jake Dec 7 '18 at 18:48

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.