Not necessarily, especially if the guide itself is revised. Here's how to modify the source code from scratch, then install the user-compiled rt2870 driver via BASH script. The first three steps here are identical to those of the original instructions on the first page of this thread.
1. Download the rt2870USB driver to your downloads file from the Ralink website:
http://www.ralinktech.com/support.php?s=2
Right click to extract the file. Rename the extracted file "RT2870".
2. Open the source code file "~/Downloads/R2870/os/linux/config.mk" and change the following two values from "=n" to "=y" so that the result is:
Code:
HAS_WPA_SUPPLICANT=y
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
Save and exit.
3. Open "~/Downloads/R2870/common/cmm_wpa.c" and change the character encoding to Western if needed. Use control+f to search for
Highlight MIX_CIPHER_NOTUSE and copy-paste
Code:
WPA_TKIPAES_WPA2_TKIPAES
into its place. Save and exit.
4. In Terminal, run
Code:
gksudo gedit /etc/modules
and add
at the bottom to tell Ubuntu to load the driver at startup.
Now you've modified the source files in the same was as in the first guide. I'm working on a way to automate this, but it will have to be manual for now.
4. It would be annoying to edit that code every time the driver needed recompiling, so we want to put it somewhere permanently.
Code:
sudo mv ~/Downloads/RT2870 /usr/src/
5. Now for the script. It reads from the /usr/src/RT2870 directory no matter what kernel version you have. Copy and paste the following into a blank gedit document. Save it as "rt2870_install.sh" in your Documents directory.
Code:
#!/bin/bash
cd /usr/src/RT2870
make
make install
ifconfig wlan0 down
rmmod rt2870sta
cd /lib/modules/`uname -r`/kernel/drivers/staging/rt2870/
sudo mv rt2870sta.ko rt2870sta.ko.dist
cd /usr/src/RT2870/os/linux
sudo cp rt2870sta.ko /lib/modules/`uname -r`/kernel/drivers/staging/rt2870/
modprobe rt2870sta
exit 0
6. Any time you need to reinstall the modified driver, open up Terminal and type
Code:
sudo sh ~/Documents/rt2870_install.sh
which will run the script and do the dirty work for you.
*About the script: the modprobe rt2870sta is intended to start the modified driver immediately, without having to reboot. However, I've always had to reboot to initialize the module. Also, I have found a way to determine if there has been a kernel update through a bash script and then automatically reinstall the modified driver, but I don't know how to use Upstart to initialize it with root privileges at startup. If anyone knows how to do this or clean up the above script, let us know!
Bookmarks