The WiFi USB dongles based on the newest RT5572 chip set do not work out of the box on Ubuntu. Unex DNUR-V72, D-Link DWA-160 Rev B and TP-Link TL-WDN3200 dongles are based on this chipset.
You will need to compile the source code of the driver to make it work. Do not leave this page! This involves only a few easy steps.
1. Save this page’s link. You will have to reboot and come back to it.
2. Un-plug the WiFi USB dongle from your computer.
3. Reboot your computer.
4. Download the driver’s source code from the manufacturer website. Alternatively, you can download a version of this file from this site. Files have been already edited. Steps 9, 10 and 11 are then unnecessary. Note that the filename is slightly different (DPO_RT5572_LinuxSTA_2.6.0.1_20120629_EDITED.tar.bz2.bz2).
5. Open a terminal window.
6. Change to the directory that contains the driver’s source code downloaded previously. For example,
cd /home/myuser/Downloads
7. Extract the source code. You might need the modify the file name since Mediatek may publish newer source code. For example (there is two bz2 extensions!),
tar xvf DPO_RT5572_LinuxSTA_2.6.0.1_20120629.tar.bz2.bz2
8. Change to the source code directory
cd DPO_RT5572_LinuxSTA_2.6.0.1_20120629
9. Edit the file os/linux/config.mk. Set to y the two variables HAS_WPA_SUPPLICANT and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT. Your file shall shows
# Support Wpa_Supplicant
# i.e. wpa_supplicant -Dralink
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manager
# i.e. wpa_supplicant -Dwext
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
10. Edit the file os/linux/usb_main_dev.c. Add a line containing MODULE_LICENSE(“GPL”);. This line is important. The position of the line is important. Your file shall shows
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL");
#ifdef CONFIG_STA_SUPPORT
#ifdef MODULE_VERSION
11. Edit the file common/cmm_mac_usb.c and add the lines “#define usb_buffer_alloc(a, b, c, d) usb_alloc_coherent(a, b, c, d)” and “#define usb_buffer_free(a, b, c, d) usb_free_coherent(a, b, c, d)“. The position of the lines is important. Your file shall shows
#ifdef RTMP_MAC_USB
#define usb_buffer_alloc(a, b, c, d) usb_alloc_coherent(a, b, c, d)
#define usb_buffer_free(a, b, c, d) usb_free_coherent(a, b, c, d)
#include "rt_config.h"
12. In the same directory as step #8, compile the driver’s source code. Type the following command:
sudo make
13. Install the driver. Type the following command:
sudo make install
14. Plug your WiFi USB dongle.
15. After a few seconds, you should see an interface called ra0 if you type the following command:
sudo ifconfig
16. Configure your connection as you would normally do.
来源:oschina
链接:https://my.oschina.net/u/153782/blog/369447