当前位置: 代码迷 >> Wireless >> TP-LINK TL-WN322G+ v2移植有关问题
  详细解决方案

TP-LINK TL-WN322G+ v2移植有关问题

热度:2778   发布时间:2013-02-26 00:00:00.0
TP-LINK TL-WN322G+ v2移植问题
近日想把手上的TP-LINK TL-WN322G+ v2移植到开发板上,这个WIFI所用芯片是AR9271,在内核2.6.37之前内核驱动都没很好支持这个芯片,很不幸我用32的内核,只能下载开源组织的驱动进行移植(http://linuxwireless.org/en/users/Drivers/ath9k_htc),根据驱动里的文档介绍,我自己植到自己的PC上可以正常使用,步骤是开源组织的方法进行编译http://linuxwireless.org/en/users/Download

#tar jxvf compat-wireless-2011.05.25.tar.bz2
#cd compat-wireless-2011-05-25
#./scripts/driver-select ath9k_htc
#make 
#make install 
最后到http://wireless.kernel.org/download/htc_fw/下载这个wifi所用的固件 htc_9271.fw htc_7010.fw到/lib/firmware 文件夹上,插入TP-LINK TL-WN322G+ v2设备后可以找到周围的无线路由器的信号了。

但我用同想方法把这个WIFI移植到mips的开发板上,使在编译之前只要设置开发板内核源码路径环境变量和交叉编译工具链后,
#export KLIB=/home/kernel/linux-2.6.32 KLIB=/home/kernel/linux-2.6.32 

执行make命令编译出来的.ko文件可以正常加载到开发板上,
#insmod /lib/modules/compat.ko
#insmod /lib/modules/compat_firmware_class.ko
#insmod /lib/modules/cfg80211.ko
#insmod /lib/modules/mac80211.ko
#insmod /lib/modules/lib80211.ko
#insmod /lib/modules/ath.ko
#insmod /lib/modules/ath9k_hw.ko
#insmod /lib/modules/ath9k_common.ko
#insmod /lib/modules/ath9k_htc.ko

#lsmod
ath9k_htc 67986 0
ath9k_common 1458 1 ath9k_htc
ath9k_hw 280301 2 ath9k_htc,ath9k_common
ath 16419 2 ath9k_htc,ath9k_hw
mac80211 315908 1 ath9k_htc
cfg80211 174081 3 ath9k_htc,ath,mac80211
compat_firmware_class 6885 1 ath9k_htc
compat 5008 3 ath9k_htc,mac80211,cfg80211

然后把ar7010.fw* ar7010_1_1.fw* ar9271.fw* htc_7010.fw* htc_9271.fw*这几个固件文件拷贝到开发板的/lib/firmware/文件里,并设置为root权限。
# ls /lib/firmware/
ar7010.fw* ar7010_1_1.fw* ar9271.fw* htc_7010.fw* htc_9271.fw*


但插入TP-LINK TL-WN322G+ v2设备后提示打不到 “usb 1-2: ath9k_htc: Firmware - htc_9271.fw not found”
tangox-ehci-hcd-0 tangox-ehci-hcd-0: resume root hub
hub 1-0:1.0: hub_resume
tangox-ehci-hcd-0 tangox-ehci-hcd-0: GetStatus port 2 status 001803 POWER sig=j CSC CONNECT
hub 1-0:1.0: port 2: status 0501 change 0001
hub 1-0:1.0: state 7 ports 2 chg 0004 evt 0000
hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s
tangox-ehci-hcd-0 tangox-ehci-hcd-0: port 2 high speed
tangox-ehci-hcd-0 tangox-ehci-hcd-0: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
usb 1-2: new high speed USB device using tangox-ehci-hcd-0 and address 2
tangox-ehci-hcd-0 tangox-ehci-hcd-0: port 2 high speed
tangox-ehci-hcd-0 tangox-ehci-hcd-0: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
usb 1-2: default language 0x0409
usb 1-2: udev 2, busnum 1, minor = 1
usb 1-2: New USB device found, idVendor=0cf3, idProduct=1006
usb 1-2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
usb 1-2: Product: USB2.0 WLAN
usb 1-2: Manufacturer: ATHEROS
usb 1-2: SerialNumber: 12345
usb 1-2: usb_probe_device
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: adding 1-2:1.0 (config #1, interface 0)
usbserial_generic 1-2:1.0: usb_probe_interface
usbserial_generic 1-2:1.0: usb_probe_interface - got id
ath9k_htc 1-2:1.0: usb_probe_interface
ath9k_htc 1-2:1.0: usb_probe_interface - got id
usb 1-2: ath9k_htc: Firmware - htc_9271.fw not found 
ath9k_htc: probe of 1-2:1.0 failed with error -22
drivers/usb/core/inode.c: creating file '002'

从打印的信息可以识别的USB设备了,但在加载WIFI固件时却加载不成功,请问各位大牛们,怎么解决这个问题?谢谢。





------解决方案--------------------------------------------------------
atheros的固件是不是需要运行啊?
我见过其他家的芯片,当把driver加载之后,还需要用hostapd进行配置才能起来。
现在atheros并到高通了,很多资料都找不到。
提示找不到fw的是你板子上的usb口子,你可以查查你的板子usb找fw的路径是啥。既然说找不到了那应该是usb尝试过去找了,你看看你板子的usb代码吧
------解决方案--------------------------------------------------------
这个涉及到firmware加载机制和udev配置文件,可以参考PC上的配置文件
------解决方案--------------------------------------------------------
  相关解决方案