Getting the RT3070 USB wifi adapter working in linux

Ralink must be one of the shittiest Linux supported network cards ever. I have a friend who’s not so good on computers, to the point where after reinstalling every  week for 3 weeks i suggested linux.

That sure saved me a lot of long drives to fix whatever went one, i could fix it with SSH. This has worked out great for both of us, especially since i moved 200 km away. She began on linux and is used to how it works, she loved it when we moved to ubuntu and she could install and remove things herself, and run updates.

Anyway, i digress, shes moving house on the coming weekend, and has a few coins leftover, and she wants to move to a wireless network. I thought “great! Linux support for most usb wifi isn’t too shabby, ill get something that works ‘out of the box’ if i can”. I went to ascent.co.nz and found this cheap card that said ‘Linux Compatible”. Well, I guess it was hoping for too much , but wasn’t expecting the problems i had.

The drivers on the cd wouldn’t compile because of the age/code/dependencies. I went to the ralink website and downloaded the latest drivers ( DPO_RT3070_LinuxSTA_V2.3.0.2_20100412 ). I ran into problems right away compiling for various reasons. Eventually i followed the following recipe to get this going.

unpackage it ;

cd DPO_RT3070_LinuxSTA_V2.3.0.2_20100412/
vi os/linux/usb_main_dev.c

Look for the following line
MODULE_DESCRIPTION(“RT2870 Wireless Lan Linux Driver”);
And add this one below it
MODULE_LICENSE(“GPL”);

Exit the editor, then do the following

sudo make
sudo cp RT2870STACard.dat RT3070STACard.dat
sudo cp RT2870STA.dat RT3070STA.dat
sudo make install
cd /etc/Wireless/
sudo ln -s RT3070STA RT2870STA
cd RT3070STA
sudo ln -s RT3070STA.dat RT2870STA.dat
sudo modprobe rt3070sta

if that works, throw the module in /etc/modules  (just the name rt3070sta ) so it loads on boot.

Now the key to all this is that ralink are cheap. They give a chip a new name, even though its clearly the same as previous ones. They do a quick run over the code to change all instances of 2870 to 3070 and of course forget half them, this is why there are odd cp’s and having to link thinks to work.

It seems that debian based distros like/need the GNU in the file, which seems to have been moved into another file in these drivers and its not registering. By adding it in it will load and work.

Let me know if this has helped you 🙂

Refs : http://www.linuxforums.org/forum/wireless-internet/161550-rt3070sta-module-license-unspecified-taints-kernel-solved.html