OpenWrt Forum Archive

Topic: kmod-rt2800-usb

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

I am trying to add a usb wifi dongle. It uses the rt2800usb driver and has the ralink 5370 chipset. From what I gathered from these forums and google is that the openwrt trunk kmod-2800-usb drivers are not working. I am getting a whole list of errors in dmesg like this one:

rt2800usb: Unknown symbol rt2x00mac_sw_scan_complete (err 0)

Is there something I am missing or that I need to do to fix this?

--
thanks

(Last edited by firesam on 20 Dec 2011, 00:16)

I'm using rt2800usb with a Sparclan Ralink dual band wifi usb dongle and it's working great--very fast and stable 11gn wireless connections (still flaky on 11an). I simply selected the rt2800usb driver in the Kernel Module/Wireless section of menuconfig. I'm running OpenWrt trunk.

(Last edited by robrob on 19 Dec 2011, 03:50)

Thanks. I know I have something to look forward to... I meant to know if opkg install kmod-rt2800-usb would work.

I did try compiling it into the kernel but something was wrong (not sure where/what) that was having trouble with finding a magic bit in some part of the boot process. I did start from scratch and I don't know why but it bricked the router (even no failsafe) I need to connect the serial cable too see whats happening there. (I think I used the wrong fw by accident -- it happens)

Anyways I am happy to know that it works at least if compiled in. I am also running trunk.

--
thanks.

-edit-
I know the problem. It is the same error as before but like the genius I am I did not test it first on the router with the serial cable connected. now I need to solder on some connection to tftp boot a working fw.

just for curiosity sake here is whats happening. I have no clue why. as far as I know it is a clean build. I have a seperate build where I change makefiles etc.. so it is more likely a mistake from there, but here should be clean.
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00105024: 0x1513 instead

-- thanks again

(Last edited by firesam on 19 Dec 2011, 05:34)

I tried again from scratch compiled build 29570 with the profile of my router (tplink mr3220) and added only kmod-rt2800-usb into the firmware.

It runs fine but I still dont see how to get it to recognise the wifi dongle. In /etc/config/wireless there is only one radio device. I even had the dongle plugged in on the first boot when it sets up the router. how do I see if its recognising/installing?

I should add that the device I have uses the ralink 5370 chipset.
lsusb: Bus 001 Device 003: ID 148f:5370 Ralink Technology, Corp.

(Last edited by firesam on 20 Dec 2011, 00:12)

Run dmesg and post its output and we'll see if we can see what's going on with the driver.

[    0.000000] Linux version 2.6.39.4 (tux@MintyTuX) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #1 Mon Dec 19 16:54:50 EST 2011
[    0.000000] prom: fw_arg0=00000001, fw_arg1=80a01920, fw_arg2=00000000, fw_arg3=00000000
[    0.000000] MyLoader: sysp=f0f0f0f0, boardp=f0f0f0f0, parts=f0f0f0f0
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7241 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802bf820, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-MR3220 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29324k/32768k available (2035k kernel code, 3444k reserved, 396k data, 196k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:80
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is TP-LINK TL-MR3220
[    0.730000] registering PCI controller with io_map_base unset
[    0.740000] bio: create slab <bio-0> at 0
[    0.750000] pci 0000:00:00.0: [168c:ff1c] type 0 class 0x000200
[    0.750000] pci 0000:00:00.0: fixup device configuration
[    0.750000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0000ffff 64bit]
[    0.750000] pci 0000:00:00.0: supports D1
[    0.750000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.750000] pci 0000:00:00.0: PME# disabled
[    0.750000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.760000] pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff 64bit] (PCI address [0x10000000-0x1000ffff])
[    0.770000] PCI: mapping irq 72 to pin1@0000:00:00.0
[    0.770000] Switching to clocksource MIPS
[    0.780000] NET: Registered protocol family 2
[    0.780000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.780000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.790000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.790000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.800000] TCP reno registered
[    0.800000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.810000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.810000] NET: Registered protocol family 1
[    0.820000] PCI: CLS 0 bytes, default 32
[    0.830000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.840000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.850000] msgmni has been set to 57
[    0.860000] io scheduler noop registered
[    0.860000] io scheduler deadline registered (default)
[    0.860000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.890000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.900000] console [ttyS0] enabled, bootconsole disabled
[    0.910000] Atheros AR71xx SPI Controller driver version 0.2.4
[    0.920000] m25p80 spi0.0: found en25f32, expected m25p80
[    0.930000] m25p80 spi0.0: en25f32 (4096 Kbytes)
[    0.930000] 5 tp-link partitions found on MTD device spi0.0
[    0.940000] Creating 5 MTD partitions on "spi0.0":
[    0.940000] 0x000000000000-0x000000020000 : "u-boot"
[    0.950000] 0x000000020000-0x0000000fa200 : "kernel"
[    0.950000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.970000] 0x0000000fa200-0x0000003f0000 : "rootfs"
[    0.970000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.990000] mtd: partition "rootfs" set to be root filesystem
[    0.990000] mtd: partition "rootfs_data" created automatically, ofs=270000, len=180000
[    1.000000] 0x000000270000-0x0000003f0000 : "rootfs_data"
[    1.010000] 0x0000003f0000-0x000000400000 : "art"
[    1.010000] 0x000000020000-0x0000003f0000 : "firmware"
[    1.360000] ag71xx_mdio: probed
[    1.360000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    1.950000] eth0: Found an AR7240/AR9330 built-in switch
[    1.970000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[    2.580000] eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.580000] Atheros AR71xx hardware watchdog driver version 0.1.0
[    2.580000] ar71xx-wdt: timeout=15 secs (max=21)
[    2.580000] TCP westwood registered
[    2.590000] NET: Registered protocol family 17
[    2.590000] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[    2.600000] All bugs added by David S. Miller <davem@redhat.com>
[    2.620000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.620000] Freeing unused kernel memory: 196k freed
[    5.210000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    5.390000] Button Hotplug driver version 0.4.1
[    5.470000] Registered led device: tp-link:green:system
[    5.480000] Registered led device: tp-link:green:qss
[    5.480000] Registered led device: tp-link:green:3g
[    5.600000] eth0: link up (1000Mbps/Full duplex)
[    8.830000] JFFS2 notice: (422) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2 of xdatum (1 unchecked, 1 orphan) and 33 of xref (0 dead, 14 orphan) found.
[    9.030000] eth0: link down
[    9.900000] Compat-wireless backport release: compat-wireless-2011-11-29
[    9.900000] Backport based on wireless-testing.git master-2011-12-01
[   10.040000] cfg80211: Calling CRDA to update world regulatory domain
[   10.550000] cfg80211: World regulatory domain updated:
[   10.550000] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.560000] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.570000] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.580000] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.580000] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.590000] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.720000] usbcore: registered new interface driver usbfs
[   10.730000] usbcore: registered new interface driver hub
[   10.750000] usbcore: registered new device driver usb
[   11.660000] usbcore: registered new interface driver rt2800usb
[   11.740000] PPP generic driver version 2.4.2
[   11.970000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.140000] NET: Registered protocol family 24
[   12.220000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.230000] ar71xx-ehci ar71xx-ehci: Atheros AR91xx built-in EHCI controller
[   12.230000] ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
[   12.270000] ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
[   12.290000] ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
[   12.290000] hub 1-0:1.0: USB hub found
[   12.300000] hub 1-0:1.0: 1 port detected
[   12.390000] nf_conntrack version 0.5.0 (461 buckets, 1844 max)
[   12.620000] usb 1-1: new high speed USB device number 2 using ar71xx-ehci
[   12.750000] uhci_hcd: USB Universal Host Controller Interface driver
[   12.930000] usbcore: registered new interface driver yealink
[   12.940000] yealink: yld-20051230:Yealink phone driver
[   14.400000] eth0: link up (1000Mbps/Full duplex)
[   14.410000] device eth0 entered promiscuous mode
[   14.470000] br-lan: port 1(eth0) entering forwarding state
[   14.480000] br-lan: port 1(eth0) entering forwarding state
[   20.960000] ar71xx-wdt: enabling watchdog timer

Your dmesg does contain:

[   11.660000] usbcore: registered new interface driver rt2800usb

Which is very similar to my dmesg:

Dec 22 09:57:08 RSPro kern.debug kernel: [   40.800000] Registered led device: rt2800usb-phy2::radio
Dec 22 09:57:08 RSPro kern.debug kernel: [   40.800000] Registered led device: rt2800usb-phy2::assoc
Dec 22 09:57:08 RSPro kern.debug kernel: [   40.800000] Registered led device: rt2800usb-phy2::quality
Dec 22 09:57:08 RSPro kern.info kernel: [   40.800000] usbcore: registered new interface driver rt2800usb

I don't know why your Ralink radio isn't coming online like mine:

Dec 22 09:59:24 RSPro kern.info kernel: [   92.970000] device wlan2 entered promiscuous mode
Dec 22 09:59:24 RSPro kern.info kernel: [   92.980000] br-lan: port 4(wlan2) entering forwarding state
Dec 22 09:59:24 RSPro kern.info kernel: [   92.990000] br-lan: port 4(wlan2) entering forwarding state
Dec 22 09:59:30 RSPro kern.info kernel: [   99.850000] device wlan2 left promiscuous mode
Dec 22 09:59:30 RSPro kern.info kernel: [   99.860000] br-lan: port 4(wlan2) entering forwarding state
Dec 22 09:59:31 RSPro kern.info kernel: [   99.980000] device wlan2 entered promiscuous mode
Dec 22 09:59:31 RSPro kern.info kernel: [   99.990000] br-lan: port 4(wlan2) entering forwarding state
Dec 22 09:59:31 RSPro kern.info kernel: [   99.990000] br-lan: port 4(wlan2) entering forwarding state

I assume the rt2800 driver is not compatible with your Ralink 5370 chipset.

(Last edited by robrob on 22 Dec 2011, 16:18)

the rt2800usb driver on ubuntu does recognize the device, but I guess I need to focus on the driver not wrt.

Does this site http://cateee.net/lkddb/web-lkddb/RT2800USB.html help me?

--thanks

(Last edited by firesam on 22 Dec 2011, 19:14)

That site indicates the driver supports RT2770, RT2870 & RT3070, RT3071 & RT3072

Your Ralink USB dongle has a Ralink 5370 chipset but it is strange that the Ubuntu rt2800usb driver works.

Do you have these packages installed:

kmod-rt2800-lib
kmod-rt2800-usb
kmod-rt2x00-lib
kmod-rt2x00-usb

Here's my router's lsusb output:

Bus 001 Device 005: ID 148f:3572 Ralink Technology, Corp. RT3572 Wireless Adapter

RT3572 is an RT3072 with 5GHz dual band added (5GHz is flaky on OpenWrt). It's basically a combo RT2770 11gn & RT2750 11an radio.

(Last edited by robrob on 22 Dec 2011, 23:16)

I might be wrong but isn't the 5370 listed in the hardware list on that site?

here is my output:

root@OpenWrt:/# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


root@OpenWrt:/# dmesg | tail -2
[   20.680000] ar71xx-wdt: enabling watchdog timer
[  283.330000] usb 1-1: new high speed USB device number 2 using ar71xx-ehci



root@OpenWrt:/# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp.



root@OpenWrt:/# opkg list-installed | grep kmod-rt2
kmod-rt2800-lib - 2.6.39.4+2011-12-01-1
kmod-rt2800-usb - 2.6.39.4+2011-12-01-1
kmod-rt2x00-lib - 2.6.39.4+2011-12-01-1
kmod-rt2x00-usb - 2.6.39.4+2011-12-01-

It looks right to me...

(Last edited by firesam on 23 Dec 2011, 19:33)

It looks right to me too.

firesam wrote:

I might be wrong but isn't the 5370 listed in the hardware list on that site?

What about that? Am I making a mistake?
In the section:

Hardware
USB
Numeric ID (from LKDDb) and names (from usb.ids) of recognized devices:
...
vendor: 148f ("Ralink Technology, Corp."), product: 5370 ("RT5370 Wireless Adapter")
...


-- thanks

also what about this: http://patchwork.ozo.com/patch/838/


--again

(Last edited by firesam on 25 Dec 2011, 00:57)

as per mailing list openwrt-devel@lists.openwrt.org:

CONFIG_RT2800USB_RT53XX is supposed to live in
BUILDARGS rather than MAKE_OPTS to actually get support for the Rt5370.
Thanks to actmnophn for the hint!

This reverts changeset 29116 and adds it to the right section in the Makefile.

Signed-off-by: Daniel Golle <dgolle@allnet.de>

Index: package/mac80211/Makefile
===================================================================
--- package/mac80211/Makefile    (revision 29569)
+++ package/mac80211/Makefile    (working copy)
@@ -1095,6 +1096,7 @@
    $(if $(NEED_RT2X00_LIB_LEDS),-DCONFIG_RT2X00_LIB_LEDS) \
    $(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),-DCONFIG_RT2X00_LIB_PCI) \
    $(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),-DCONFIG_RT2X00_LIB_USB) \
+    $(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),-DCONFIG_RT2800USB_RT53XX) \
    $(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),-DCONFIG_RT2X00_LIB_SOC) \
    $(if $(CONFIG_TARGET_atheros),-DCONFIG_ATH5K_AHB,-DCONFIG_ATH5K_PCI) \
    $(if $(CONFIG_PACKAGE_kmod-iwl3945),-DCONFIG_IWL3945) \
@@ -1171,7 +1173,6 @@
    CONFIG_RT2800_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2800-lib),m) \
    CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \
    CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \
-    CONFIG_RT2800USB_RT53XX=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),y) \
    CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \
    CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \
    CONFIG_RTL8192CE= \

Unfortunately I cannot test it because installing the drivers in windows messed up the dongle somehow. it won't even be recognized in windows and gives error 71 from now on in ubuntu and openwrt. I am getting a new one and will test it when it arrives.

(Last edited by firesam on 27 Dec 2011, 01:13)

The discussion might have continued from here.