brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.59k stars 462 forks source link

Suggestion: install a udev rule that switches the USB mode to Wifi when the device is plugged in #20

Open dscottboggs opened 4 years ago

dscottboggs commented 4 years ago

I've set the following udev rule to cause the dongle to automatically switch into WiFi mode as soon as it's plugged in:

# /etc/udev/rules.d/90-rtl8821CU.rules
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -KW -v 0bda -p 1a2b"

Just thought there might be a way we can make this happen out of the box when it's installed.

cryobry commented 4 years ago

I just created PR https://github.com/brektrou/rtl8821CU/pull/26.

jamesle-0812 commented 4 years ago

You save my ass bro!