第一次尝试驱动的移植可谓真的是不容易啊,现在记录一下我所遇到的问题。
opwnert我是使用turn R4558
一、在官网http://www.mediatek.com/下载了DPO_RT5572_LinuxSTA_2.6.1.3_20121022然后按照readme的方法修改。然后编译最后在os/linux中得到RT3070。KO的驱动模块。加载到内核中。使用iw命令都可以查看到WIFI的信号,但是就是在luci中找不到这个网卡的接口。到现在都没有办法解决。
使用wifi detetc>/etc/config/wireless都不能重新生成接口的配置,使用iwconfig命令得到
ra0 ralink sta这个明显的不对啊,应该是ra0 ieee80211 等等才可以使用wifi命令重新配置wireless啊。。无赖看不懂驱动程序。不知道怎么修改
二、没有办法了只用使用openwrt自带的驱动了(rt2800 rt28xxlib)。(编译内核模块的时候添加进来就OK了)。
三、在使用自己编译的驱动或者使用自带的驱动都会有一个问题。在插入usb网卡之后可以正常识别网卡并驱动。但是使用ifconfig ra0 up的时候,查看内核日志(dmesg)发现usb断开了连接,然后又立马连接上。一下是我打印的信息
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.750000] rtusb init rt2870 --->
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.750000]
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.750000]
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.750000] === pAd = c0953000, size = 512288 ===
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.750000]
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.760000] <-- RTMPAllocAdapterBlock, Status=0
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.770000] NICLoadFirmware: The NIC is AutoRun Mode
Tue Apr 14 20:01:09 2015 kern.warn kernel: [ 94.770000] NVM is EFUSE
Tue Apr 14 20:01:09 2015 kern.info kernel: [ 94.770000] usbcore: registered new interface driver rt2870
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.220000] RtmpAsicLoadFirmware: ver 21/21, sum 8061/f7cd, mac 80612100
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.220000] RtmpAsicLoadFirmware: WOW stops to go into 4K ram codes ...
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.230000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.240000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.240000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.250000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.250000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.260000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.260000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.270000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.270000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.280000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.280000] RTUSB_VendorRequest failed(-32),TxFlags=0x0, ReqType=OUT, Req=0x14, Idx=0x0,pAd->Flags=0x0
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.290000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.300000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.300000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.310000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.320000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.320000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.330000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.330000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.340000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.340000] #
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.350000] RTUSB_VendorRequest failed(-32),TxFlags=0x0, ReqType=OUT, Req=0x12, Idx=0x0,pAd->Flags=0x0
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.360000] NICLoadFirmware: firmware loaded already
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.370000] <-- RTMPAllocTxRxRingMemory, Status=0
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.370000] RTMP_TimerListAdd: add timer obj c099b0b8!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.380000] RTMP_TimerListAdd: add timer obj c099b0e8!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.380000] RTMP_TimerListAdd: add timer obj c099b118!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.390000] RTMP_TimerListAdd: add timer obj c099b088!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.390000] RTMP_TimerListAdd: add timer obj c099aff8!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.400000] RTMP_TimerListAdd: add timer obj c099b028!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.400000] RTMP_TimerListAdd: add timer obj c096582c!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.410000] RTMP_TimerListAdd: add timer obj c0954d0c!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.410000] RTMP_TimerListAdd: add timer obj c0954d40!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.420000] RTMP_TimerListAdd: add timer obj c09658d0!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.420000] RTMP_TimerListAdd: add timer obj c09657cc!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.430000] RTMP_TimerListAdd: add timer obj c096589c!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.430000] -->RTUSBVenderReset
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.440000] <--RTUSBVenderReset
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.670000] Key1Str is Invalid key length(0) or Type(0)
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.680000] Key2Str is Invalid key length(0) or Type(0)
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.680000] Key3Str is Invalid key length(0) or Type(0)
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.690000] Key4Str is Invalid key length(0) or Type(0)
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.690000] 1. Phy Mode = 5
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.700000] 2. Phy Mode = 5
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.700000] NVM is Efuse and its size =2d[2d0-2fc]
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.750000] phy mode> Error! The chip does not support 5G band 5!
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.760000] RTMPSetPhyMode: channel is out of range, use first channel=1
Tue Apr 14 20:13:53 2015 kern.warn kernel: [ 149.790000] 3. Phy Mode = 9
Tue Apr 14 20:13:54 2015 kern.warn kernel: [ 149.790000] [mAntCfgInit: primary/secondary ant 0/1
Tue Apr 14 20:13:54 2015 kern.warn kernel: [ 149.790000] [mMCS Set = ff 00 00 00 01
Tue Apr 14 20:13:54 2015 kern.warn kernel: [ 149.920000] <==== rt28xx_init, Status=0
Tue Apr 14 20:13:54 2015 kern.warn kernel: [ 149.930000] 0x1300 = 00064300
Tue Apr 14 20:15:37 2015 kern.info kernel: [ 252.880000] usb 1-1: USB disconnect, device number 2
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.880000] Bulk In Failed. Status=-143, BIIdx=0x0, BIRIdx=0x0, actual_length= 0x0
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.890000] rtusb_disconnect: unregister usbnet usb-ehci-platform-1
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.890000] RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.920000] Retry count exhausted or device removed!!!
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.920000] Retry count exhausted or device removed!!!
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.930000] Retry count exhausted or device removed!!!
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.930000] Retry count exhausted or device removed!!!
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.990000] ---> RTMPFreeTxRxRingMemory
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 252.990000] <--- RTMPFreeTxRxRingMemory
Tue Apr 14 20:15:37 2015 kern.warn kernel: [ 253.000000] RTUSB disconnect successfully
Tue Apr 14 20:15:37 2015 kern.info kernel: [ 253.290000] usb 1-1: new high-speed USB device number 3 using ehci-platform
一开始怀疑是USB接口的供电不足。在网卡芯片的处从新接入一个5v还是不行。无赖只有不使用网卡自带的10m usb延长线,终于0K了。
我分析应该是AR9311usb接口驱动能力不足。没有加入驱动芯片。等有时间重新改造一下这个usb接口
最后一步了。使用RT3070链接一个信号很弱的wifi(AP clent模式).命名为TP接口。使用AR9311自带的wifi作为mast模式作为AP。()接口选择默认的lan接口。。
就可以实现usb网卡连接其他人的wifi。AR9311在转发出来。。