Original Article:
If you found this post, I'll bet that you are wondering what "supported in Linux" means on this little adapter. Be wary, this device is not for the faint of heart. But it can be made to work (however thus far not on 802.11n), and here's how I did it.
First, plug and pray. If it works with the stock driver, then you're in luck! If not, let's see if your problem is similar enough to mine before wasting any more of our time. Even if you have the same model number, that's not a sure-fire way to tell if the hardware inside that little plastic case is the same.
In a command prompt, type:
# lsusb | egrep 148f:3070
You should get a line like the one below. If you get nothing, then you can probably stop reading here, as this solution likely doesn't exactly apply to you. If you're sure you have a similar card, do check out the useful links at the bottom of this post. Find your own way, be Zen, etc. etc.
Bus 001 Device 009: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Ok, so you have the same hardware. Next, a step that maybe applies to you, depending on the history of your system. We are looking to see if multiple drivers are fighting for your adapter.
# lsmod | egrep -w 'rt.*'
You should only see a line starting with
rt2870sta
, and not any other lines starting with 'rt'. If you do see other 'rt' drivers, or just want to play it safe, edit /etc/modprobe.d/blacklist.conf
and add the following lines:blacklist rt2800usb
blacklist rt2x00usb
blacklist rt2800lib
blacklist rt2x00lib
Reboot and check, you may have fixed your problem. Especially if you had multiple 'rt' drivers. If it doesn't work, we'll soon be making a new driver, so go ahead and blacklist the Ubuntu default.
blacklist rt2870sta
The device came with a driver CD, and as of today the most current driver on the website (zonetusa.com) is the same as the one on the CD (tar archive named "
Linux STA_V2.3.0.2
", md5sum: 73b4a7ca76da9995b0d6ec65e23e82fe
). We'll be using that tarball-ed driver. I'll assume you know how to mount the cdrom, and extract the tarball somewhere sane (e.g. Desktop), but if you don't then just ask.Once you have the driver files extracted:
# cd './DPO_RT3070_LinuxSTA_V2.3.0.2_20100412/'
# cp RT{28,30}70STA.dat
.Now, edit
'./os/linux/usb_main_dev.c'
and after the description line, add the license (hit the reference links below for an explanation):...
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL");
...
Save. Exit. Breathe, we're getting close to done here.
Time to edit
'./include/os/linux_rt.h'
. There are two function calls that need to be changed, usb_buffer_alloc
and usb_buffer_free
. Name them usb_alloc_coherent
and usb_free_coherent
, respectively. DO NOT rename the functions rausb_buffer_alloc
and rausb_free_coherent
(e.g. with a find-and-replace).# sudo make
# sudo make install
# sudo rm /tftpboot
(the
/tftpboot
bit is an apparent glitch in their code easier fixed after the fact)Grab the .tgz (from the github.com link) containing '
RealTek_2760_2860_wireless_n.dat
' and copy the dat file to /etc/Wireless/http://gist.github.com/591038
For whatever reason the original .dat really didn't work for me. I could iwscan to my heart's content, but never connect. This one has allowed me to connect to a random coffeeshop 1Mb/s 802.11b network with WEP.
# sudo mkdir /etc/Wireless/RT2870STA/
# sudo cp /etc/Wireless/RealTek_2760_2860_wireless_n.dat /etc/Wireless/RT2870STA/RT2870STA.dat
# sudo chmod 755 /etc/Wireless/RT2870STA/RT2870STA.dat
# cd ./os/linux/
# sudo insmod rt3070sta.ko
If the
insmod
fails, check lsmod
for any 'rt' modules. If there are any, make sure the zew2590 is unplugged and use sudo rmmod module
to get rid of all the 'rt' modules. Then try sudo insmod rt3070sta.ko
again.Plug (or pull it and replug) in the device once the module is up. You should get a new interface in the output of
iwconfig
named ra0
(your number may differ if you have created ra#
devices on your system in the past).Gotcha #1: Best I've gotten is 802.11b with WEP (via NetworkManager, no less, which is otherwise hit-or-miss with this card).
Gotcha #2: Though the device allows you to set it to Monitor mode, and iwconfig claims that it's in Monitor mode, it does not receive any packets at all in that mode.
Gotcha #3: I am aware (and with proper sleep/caffeine, you are too) that there's references to rt2870 AND rt3070. They flip-flop around because they were coded that way. For example,
make install
wants RT3070STA.dat
to copy to /etc/Wireless/RT3070STA
, but then the module wants to read /etc/Wireless/RT2870STA
. Someone please buy the QA department at Zonet a few cases of Monster energy drinks.This is way too much work for an 802.11b connection, but I'm stubborn. I'll update this post if I get 802.11n or Monitor mode working. Since it's my only 802.11n card AND the best antenna of my menagerie of wireless cards, I'll not be giving up just yet.
Useful links:
http://www.linuxforums.org/forum/wireless-internet/161550-rt3070sta-module-license-unspecified-taints-kernel-solved.html
http://ubuntuforums.org/showpost.php?p=10381667&postcount=72
http://ubuntuforums.org/showthread.php?t=1342593&highlight=rt2870
http://ubuntuforums.org/showthread.php?t=1246960
http://ubuntuforums.org/showpost.php?p=9874532&postcount=27
No comments:
Post a Comment