Skip to content

Instantly share code, notes, and snippets.

@abeyt
Created January 27, 2021 12:56
Show Gist options
  • Save abeyt/28ee297c6a2f938d6070c56927d8e6d8 to your computer and use it in GitHub Desktop.
Save abeyt/28ee297c6a2f938d6070c56927d8e6d8 to your computer and use it in GitHub Desktop.
Install Mercury USB WiFi AC650M driver on Raspberry Pi
#http://124.244.86.40:8080/wordpress/2020/12/13/%E5%9C%A8-raspberry-pi-%E5%AE%89%E8%A3%9D-mercury-usb-wifi-ac650m-%E9%A9%85%E5%8B%95/ (jan2021)
mkdir -p ~/build
cd ~/build
git clone https://github.com/brektrou/rtl8821CU.git
sudo apt-get install dkms bc vim -y
sudo apt update -y
sudo apt upgrade --fix-missing -y && reboot
cd ~/build/rtl8821CU
sudo vim Makefile
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ARM_RPI = n
Change to
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
sudo cp -v /lib/modules/$(uname -r)/build/arch/arm/Makefile /lib/modules/$(uname -r)/build/arch/arm/Makefile.$(date +%Y%m%d%H%M)
sudo sed -i 's/-msoft-float//' /lib/modules/$(uname -r)/build/arch/arm/Makefile
sudo ln -s /lib/modules/$(uname -r)/build/arch/arm /lib/modules/$(uname -r)/build/arch/armv7l
sudo ./dkms-install.sh
sudo usb_modeswitch -KW -v 0bda -p 1a2b
systemctl start bluetooth.service
sudo vim /lib/udev/rules.d/40-usb_modeswitch.rules
Before the following line:
LABEL="modeswitch_rules_end"
Insert the following settings
# Realtek 8211CU Wifi AC USB
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"
#
#iw dev
phy#1
Interface wlan1
ifindex 4
wdev 0x100000001
addr 54:c9...
Bus 001 Device 008: ID 0bda:c820 Realtek Semiconductor Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0xc820
bcdDevice 2.00
iManufacturer 1 Realtek
iProduct 2 802.11ac NIC
iSerial 3 123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment