linux安装TL-WN722N驱动

来源:互联网 发布:淘宝买家秀 百度云盘 编辑:程序博客网 时间:2024/04/29 13:44

TL-WN722N的芯片是AR9271,驱动型号是 ath9k_htc

下面是安装过程:

01 root@bt:~# lsusb
02 Bus 001 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n 
03 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
04 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
05 root@bt:~# mkdir ar9271 
06 root@bt:~# cd ar9271/ 
07 root@bt:~/ar9271# git clone git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git 
08 root@bt:~/ar9271# cp ./linux-firmware/ar9271.fw /lib/firmware 
09 root@bt:~/ar9271# wget http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2
10 root@bt:~/ar9271# tar -jxvf compat-wireless-2.6.tar.bz2 
11 root@bt:~/ar9271# cd compat-wireless-2010-10-04/ 
12 root@bt:~/ar9271/compat-wireless-2010-10-04# ./scripts/driver-select ath9k_htc 
13 Processing new driver-select request… 
14 Backing up makefile: Makefile.bk 
15 Backup exists: Makefile.bk 
16 Backup exists: Makefile.bk 
17 Backing up makefile: drivers/net/wireless/Makefile.bk 
18 Backing up makefile: drivers/net/wireless/ath/Makefile.bk 
19 Backing up makefile: net/wireless/Makefile.bk 
20 Backing up makefile: drivers/net/Makefile.bk 
21 Backing up makefile: drivers/ssb/Makefile.bk 
22 Backing up makefile: drivers/misc/eeprom/Makefile.bk
23 root@bt:~/ar9271/compat-wireless-2010-10-04# make 
24 root@bt:~/ar9271/compat-wireless-2010-10-04# make install 
25 root@bt:~/ar9271/compat-wireless-2010-10-04# cd ~/ar9271/ 
26 root@bt:~/ar9271# reboot 


重启后,用 iwconfig  就能看到 wlan0 了。


值得一提的问题:
如果重启后看不到 wlan0 ,用 dmesg | grep -e ath -e wlan 看下是不是有错误。
usb 1-1: ath9k_htc: Firmware – ar9271.fw not found
如果是这个not found错误,那说明你没有把 ar9271.fw 拷贝到 /lib/firmware 下面。
ar9271.fw 的来源,可以直接到 http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree下载,不过只能通过raw 下载,否则下载的文件大小都是0字节的。用 raw 连接下载需要更改文件名。

还有一种安全一点办法就是上面用到的 git 命令,把所有的 fw 都下下来,这样就不用当心下载错什么问题,就是用的时间稍长些。

 

虚拟机上的问题:
root@bt:~# dmesg | grep -e ath -e wlan 
md: multipath personality registered for level -4 
usb 1-1: ath9k_htc: Firmware – ar9271.fw download failed 
ath9k_hif_usb: probe of 1-1:1.0 failed with error -22 
usbcore: registered new interface driver ath9k_hif_usb

搜索到的全是驱动源文件,试试没有安装 VMTools 的

BT4 R1能直接识别出是 Atheros Communications, Inc. AR9271 802.11n ,如果是BT4 ,只能识别出是 Atheros Communications 。

原创粉丝点击