OpenWrt Forum Archive

Topic: ralink rt5572 usb and openwrt problem

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I am trying to use TP-LINK TL-WDN3200 (Ralink rt5572) usb device with TP-Link TL-MR3220 router.
I successfully installed openwrt trunk on the router. None of the kernel modules recognised the device, so I searched for a driver and found one on the ralink website DPO_RT5572_LinuxSTA_2.6.0.1_20120629.
Compilation:
-changes in Makefile:
PLATFORM = INF_AR9
LINUX_SRC = /home/ivan/work/openwrt/trunk/build_dir/linux-ar71xx_generic/linux-3.3.8/
CROSS_COMPILE = /home/ivan/work/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-
-compile:
make ARCH="mips"

Compilation goes with some warnings, but it gets to rt5572sta.ko

Now on the router:

root@OpenWrt:/# insmod rt5572sta.ko
[237748.140000] rtusb init rt2870 --->
[237748.140000]
[237748.140000]
[237748.140000] === pAd = c0fb3000, size = 556328 ===
[237748.140000]
[237748.150000] <-- RTMPAllocAdapterBlock, Status=0
[237748.160000] NVM is EFUSE
[237748.170000] usbcore: registered new interface driver rt2870
root@OpenWrt:/# ifconfig ra0 up
[237766.600000] NICLoadFirmware: We need to load firmware
[237766.870000] <-- RTMPAllocTxRxRingMemory, Status=0
[237766.880000] RTMP_TimerListAdd: add timer obj c0ffb1c0!
[237766.880000] RTMP_TimerListAdd: add timer obj c0ffb1f0!
[237766.890000] RTMP_TimerListAdd: add timer obj c0ffb220!
[237766.890000] RTMP_TimerListAdd: add timer obj c0ffb190!
[237766.900000] RTMP_TimerListAdd: add timer obj c0ffb100!
[237766.900000] RTMP_TimerListAdd: add timer obj c0ffb130!
[237766.910000] RTMP_TimerListAdd: add timer obj c0fc5b34!
[237766.910000] RTMP_TimerListAdd: add timer obj c0fb5018!
[237766.920000] RTMP_TimerListAdd: add timer obj c0fb504c!
[237766.920000] RTMP_TimerListAdd: add timer obj c0fc5bd8!
[237766.930000] RTMP_TimerListAdd: add timer obj c0fc5ad4!
[237766.930000] RTMP_TimerListAdd: add timer obj c0fc5ba4!
[237766.940000] -->RTUSBVenderReset
[237766.950000] <--RTUSBVenderReset
[237767.190000] BBP_R254 = 80
[237767.390000] Key1Str is Invalid key length(0) or Type(0)
[237767.390000] Key2Str is Invalid key length(0) or Type(0)
[237767.400000] Key3Str is Invalid key length(0) or Type(0)
[237767.400000] Key4Str is Invalid key length(0) or Type(0)
[237767.410000] 1. Phy Mode = 5
[237767.410000] 2. Phy Mode = 5
[237767.420000] NVM is Efuse and its size =3c[3c0-3fb]
[237767.450000] Power = 909
[237767.450000] Power2 = a0a
[237767.460000] Power = 909
[237767.460000] Power2 = a0a
[237767.460000] Power = 909
[237767.470000] Power2 = a0a
[237767.470000] Power = 909
[237767.470000] Power2 = b0b
[237767.480000] Power = a09
[237767.480000] Power2 = b0b
[237767.490000] Power = a0a
[237767.490000] Power2 = b0b
[237767.550000] 3. Phy Mode = 5
[237767.550000] AntCfgInit: primary/secondary ant 0/1
[237767.550000] bAutoTxAgcG = 0
[237767.580000] ---> InitFrequencyCalibration
[237767.590000] InitFrequencyCalibration: frequency offset in the EEPROM = 33

The device is recognised and up
root@OpenWrt:/# ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 90:F6:52:17:0E:12 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
root@OpenWrt:/# iwconfig ra0
ra0       Ralink STA  ESSID:"11n-AP" 
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Bit Rate:1 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=10/100  Signal level:0 dBm  Noise level:0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

But no connection could be made, and no scanning result
root@OpenWrt:/# iwlist ra0 scanning
ra0       No scan results

Am I missing something, doing something wrong, or this driver needs a patch for mips ?

P.S.
On linux x86 platform same device with the same driver works.

*kick*

I'm trying the same thing.. Did you already succeeded with this? I can't even succesfully compile the driver...

same problem here with TP-LINK TL-WDN3200 - (Ralink rt5572)
got the driver sources from Ralink and compiled no problem on Ubuntu 12.10 and it works perfectly too
compiled on openwrt trunk for ar71xx successfully but when I try to get the interface up:

<4>[  222.210000] <-- RTMPAllocTxRxRingMemory, Status=0
<4>[  222.280000] -->RTUSBVenderReset
<4>[  222.730000] Key1Str is Invalid key length(0) or Type(0)
<4>[  222.740000] Key2Str is Invalid key length(0) or Type(0)
<4>[  222.750000] Key3Str is Invalid key length(0) or Type(0)
<4>[  222.750000] Key4Str is Invalid key length(0) or Type(0)
<4>[  222.760000] 1. Phy Mode = 5
<4>[  222.760000] 2. Phy Mode = 5
<4>[  222.760000] NVM is Efuse and its size =3c[3c0-3fb]
<4>[  222.810000] Power = a0a
<4>[  222.810000] Power2 = d0d
<4>[  222.830000] Power = b0b
<4>[  222.830000] Power2 = d0d
<4>[  222.900000] AntCfgInit: primary/secondary ant 0/1
<4>[  222.900000] bAutoTxAgcG = 0
<4>[  222.930000] ---> InitFrequencyCalibration
<4>[  222.960000] MCS Set = ff ff 00 00 01
<4>[  222.970000] <==== rt28xx_init, Status=0
<4>[  223.230000] Invalid Frame Type!!!
<4>[  223.570000] Invalid Frame Type!!!
<4>[  224.080000] Invalid Frame Type!!!
<4>[  224.590000] Invalid Frame Type!!!

and then the router (tplink WDR4300) reboots...anyone trying to port this driver to openwrt?

I'm trying a similar thing, trying to get 5 GHz on my Carambola2 (AR9331 SoC, also mips) with a USB Tplink Tl-WDN3200 (based on RT5572). Firstly, what changes need to made to the makefile? And, what parameters need to be used to 'make' the driver? Just these (below), or something different...? Any help would be appreciated.


-changes in Makefile:
PLATFORM = INF_AR9
LINUX_SRC = /home/ivan/work/openwrt/trunk/build_dir/linux-ar71xx_generic/linux-3.3.8/
CROSS_COMPILE = /home/ivan/work/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-
-compile:
make ARCH="mips"

bump. I really need an answer this week

The discussion might have continued from here.