Working around broken firmware for Realtek USB WLAN adapters on newer kernels

If you run a combination of newer (4.9ish) kernels and systemd, your USB wifi networking gear probably now gets funky names such as “wlx74da387e95fe” instead of “wlan0” like you were used to back in the good days. This wouldn’t be so bad, only that the firmware on those dongles can mess up when the device gets a long name. Suddenly it won’t let you connect to your wireless network, claiming that the network does not exist, even though you know for a fact that it does. What your machine is actually trying to say, I believe, is that the network device doesn’t seem to exist.

If you have those symptoms, this answer by Maciek on Stackexchange will probably help. I encountered the problem while using one of the Edimax USB wifi dongles that are popular on the Raspberry Pi.

I had to add this to /etc/udev/rules.d/70-persistent-net.rules:

# edimax USB stick
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ba:ba:ba:ba:ba:ba", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan", NAME="wlan1"

Substitute your own dongle’s MAC address for ba:ba:ba:ba:ba:ba and things should work. Of course make sure wlan1 isn’t taken already. If everything turns out well, your dongle now has a sane name again and connecting should just work.

Leave a Reply

Your email address will not be published. Required fields are marked *