There’s a bunch of posts all over about installing the vendor proprietary kernel module for the RT2870 chipset. The open source drivers are slow and very flaky. In fact sometimes my machine locked up when using them.
This is one of the best posts about how to install the vendor-provided module.
There’s one thing I could not find: how to install the module with DKMS. What’s DKMS? Dynamic Kernel Module Support. Here’s the Ubuntu wiki topic on it. Basically it automatically compiles your kernel modules so you don’t have to re-compile each module every time you have a new kernel. Ubuntu users know that new kernels pop up pretty often. Besides, it’s the Right Way to add kernel modules.
So here’s how to do it, based on the above RT2870 instructions and with what I could figure out elsewhere with DKMS.
Move the file, such as 2010_0709_RT2870_Linux_STA_v188.8.131.52.tar.bz2, to /usr/src. You will need to be root or use sudo.
Uncompress it while in /usr/src:
# tar -jxvf 2010_0709_RT2870_Linux_STA_v184.108.40.206.tar.bz2
Rename the directory according to linux kernel (and really general sanity) standards and then go that that directory:
# mv 2010_0709_RT2870_Linux_STA_v220.127.116.11 rt2870sta-18.104.22.168 # cd rt2870sta-22.214.171.124
Edit the config file to enable WPA support:
# vi os/linux/config.mk
Make these changes:
# Support Wpa_Supplicant HAS_WPA_SUPPLICANT=y # Support Native WpaSupplicant for Network Manger HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
Try compiling it:
Don’t worry about warnings, but does it barf out with a bunch of errors? If you have a very recent kernel, Ubuntu 10.10 and afterwards I think, it probably will. Go to the next step. If it compiled okay, skip the next step.
Update one of the files to reflect renamed functions in newer Linux kernels. The instructions to do that are here. Run ‘make’ again and hopefully it works okay.
Clean it all out since we’re going to make it with DKMS instead:
# make clean
Create dkms.conf with the following contents, replacing version number with the driver version number if different than my example. Here’s what mine looks like:
PACKAGE_NAME=rt2870sta PACKAGE_VERSION=126.96.36.199 MAKE="make" CLEAN="make clean" BUILT_MODULE_NAME=rt2870sta BUILT_MODULE_LOCATION="os/linux/" DEST_MODULE_LOCATION="/kernel/updates/dkms" AUTOINSTALL="YES"
dkms add, build install:
# dkms add -m rt2870sta -v 188.8.131.52 # dkms build -m rt2870sta -v 184.108.40.206 # dkms install -m rt2870sta -v 220.127.116.11
Manually create the /etc/Wireless directories and file that the module wants:
# mkdir /etc/Wireless # mkdir /etc/Wireless/RT2870STA # cp RT2870STA.dat /etc/Wireless/RT2870STA/
Blacklist and remove your old modules:
# vi /etc/modprobe.d/blacklist-network.conf
Add these lines:
blacklist rt2800usb blacklist rt2x00lib blacklist rt2x00usb
Remove these modules from running modules:
# rmmod rt2800usb rt2x00lib rt2x00usb
Pull out your USB wireless adapter, wait a few seconds, plug it back in. Everything should work, at least it did for me. Verify the new module is in use:
# lsmod | grep -i rt2870 rt2870sta 450556 1 crc_ccitt 12667 1 rt2870sta
Things I Skipped
A lot of other posts talk about an ra0 interface, or editing the file in /etc/Wireless, or updating USB IDs, or updating firmware. I didn’t do any of that. It seems to work fine, but your mileage may vary. You might want to have a look at the first link way at the top for more ideas if this does not work. The key part I’m trying to get across here is installing the rt2870sta module with DKMS.