I have a TP-Link TL-WDN3321 wireless adapter, which is powered by Ralink RT2870 chipset. I had been using Windows for some days because I couldn't drive the wireless on Linux (Can you imagine a Linux without network?). However, things changed this time, I found it quite easy to install the driver, maybe with my good luck. BTW, my Linux distribution is Fedora 19 x86_64.
First of all, connect your computer to the Internet! I found it too complicated to install driver in a new-installed system without network, because you need to find out and download all packages needed by compiling driver on another computer. At most of time, a network cable helps. But if it's too far between your computer and router, a pocket wireless router (Like TP-Link TL-WR800N I used) can be used to convert wireless to LAN.
Download the latest driver on this page. The latest driver seems to have not been updated since 2010 :-(.
And then, extract the files. As the
README_STA file says, there are two modifications in
Now run the following in terminal to install new kernel and reboot:
sudo yum install gcc kernel kernel-devel sudo reboot
After reboot, goto the directory where the driver is. Run in terminal:
sudo make sudo make install cd os/linux sudo insmod rt2870sta.ko
My Rough Expeirence
config.mk, I thought it was the time for
make, but it gave me errors. Of course, I forgot to install
kernel-devel. But after I had kernel header installed, it still gave errors.
make -C tools make: Entering directory `/home/abcdabcd987/Downloads/2010_0709_RT2870_Linux_STA_v188.8.131.52/tools' gcc -g bin2h.c -o bin2h make: Leaving directory `/home/abcdabcd987/Downloads/2010_0709_RT2870_Linux_STA_v184.108.40.206/tools' /home/abcdabcd987/Downloads/2010_0709_RT2870_Linux_STA_v220.127.116.11/tools/bin2h cp -f os/linux/Makefile.6 /home/abcdabcd987/Downloads/2010_0709_RT2870_Linux_STA_v18.104.22.168/os/linux/Makefile make -C /lib/modules/3.9.5-301.fc19.x86_64/build SUBDIRS=/home/abcdabcd987/Downloads/2010_0709_RT2870_Linux_STA_v22.214.171.124/os/linux modules make: *** /lib/modules/3.9.5-301.fc19.x86_64/build: No such file or directory. Stop. make: *** [LINUX] Error 2
It was long before I had realized where the problem was. See that, the kernel was the old one (
3.9.5-301), but yum installed a
kernel-devel for new kernel (
3.11.1-200). I found there were two ways to solve it: either you can run
yum install kernel-devel-3.9.5 for the old kernel, or you just
yum install kernel and restart to the new kernel.
Then, the building progress seemed smooth. However, I got compilation errors in
common/cmm_mac_usb.c. That's what confused me most. The error was on
RTUSB_URB_FREE_BUFFER(pObj->pUsb_Dev, bufLen, *ppXBuffer, data_dma);.
RTUSB_URB_FREE_BUFFER is a marco, which I found in
include/os/rt_linux.h later. After searching on Google, I knew that
usb_free_coherent is replaced by
usb_buffer_free since kernel 2.6.35.
Fixed that, and everything went well.