Chinese rt5390/3070: "Invalid RF chipset 0x3070 detected"
A couple of months back I picked up a cheap 802.11n USB adapter from China on eBay.
Unfortunately, it doesn't work. I'm not sure if the chipset reports the wrong things, or what. Here's the dmesg
[codeud9cstr7][ 17.766297] phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 5390, rf: 3070, rev: 0502.
[ 17.766302] phy0 -> rt2800_init_eeprom: Error - Invalid RF chipset 0x3070 detected.
[ 17.766363] phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
[ 17.766522] usbcore: registered new interface driver rt2800usb[/codeud9cstr7]
Any tips on where to go from here? I'm trying to pull the latest wireless-testing so I can debug a little.
I pulled kernel-source-3.9.4 and managed to add the settings for my device to the rt2800 usb driver, and after a couple of oopses and some cleaning up, it produces wlan1. However, the device apparently won't scan, and doesn't seem to be connecting to anything.
After a brief chat on IRC, it was suggested by moorray that I try to get info on the MAC revision etc from a debugfs directory... unfortunately this doesn't seem to be happening, even after modifying the .config file at the top of the source tree to enable that flag.
After adding an 'RF3070' define and inserting it in a couple of places so the driver won't give up, here's what happens when I try to bring the network up
[code3o89zyjl]$ sudo ifup wlan1
l2_packet_receive - recvfrom: Network is down
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ioctl[SIOCSIWSCAN]: Device or resource busy
Failed to initiate AP scan.[/code3o89zyjl]
/etc/networks/interfaces contains this
iface wlan1 inet dhcp
And /etc/wpa_supplicant.conf looks almost like this
[code3o89zyjl]wlan1 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
[code3o89zyjl]$ sudo iwlist wlan1 scan
wlan1 No scan results[/code3o89zyjl]
And dmesg after loading the rt2800usb driver and trying to ifup
[code3o89zyjl][ 3386.880048] usb 1-4: reset high-speed USB device number 3 using ehci-pci
[ 3387.037706] phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 5390, rf: 3070, rev: 0502.
[ 3387.434650] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 3387.435636] usbcore: registered new interface driver rt2800usb
[ 3387.685127] phy1 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'.
[ 3387.865580] phy1 -> rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29.
[ 3388.083069] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 4769.963428] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 4847.767364] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 4856.616370] phy1 -> rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0
[ 4856.616405] phy1 -> rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0
[ 4856.616417] phy1 -> rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0[/code3o89zyjl]
I'm happy to try debugging and recompiling the driver if anyone has suggestions...?
Ok, after some messing about (I wasn't cleaning before building the modules, and I wasn't installing or depmodding either), the debugfs dir now exists
[code1gbzh5bo]4$ sudo cat /sys/kernel/debug/ieee80211/phy1/rt2800usb/chipset
rt chip: 5390
rf chip: 3070
register base words wordsize
csr 4096 512 4
eeprom 0 136 2
bbp 0 255 1
rf 4 4 4
rfcsr 0 64 1[/code1gbzh5bo]
To get the driver to register the card, I've currently redefined RF3022 from 0x0008 to 0x3070, hoping that they would behave similarly... alas no
Okay, redefining RF5390 to 0x3070 instead has made it possible to scan successfully... it's still not associating, but...
Alright! It's up and running, albeit dropping a couple of packets now and then (3% of 790 packets sent by pinging the router - maybe this is normal with wifi).
Ultimately, I only needed to change one line in rt2800.h (line 80 in the kernel 3.9.4 version)
[code3gfzqmt4]#define RF5392 0x3070[/code3gfzqmt4]
I'll have to go back and remove a bunch of debugging statements, then add a new RF3070 define and add that to any switch cases where RF5392 is referenced.
If it stays solid, maybe I can post a patch to the mailing list in a day or two.
[b3gfzqmt4]edit[/b3gfzqmt4] (Patch posted)