Discussion:
USB WiFi adapter doesn't work with Wheezy (but does work with Ubuntu)
dclinton
2014-02-26 22:09:56 UTC
Permalink
Hi,
I've been having all kinds of trouble finding a dual band USB WiFi
adapter that will work with Debian Wheezy and I hope someone here can
help. Our best (and pretty much last) hope is the TP-Link N900
TL-WDN4200. Using it successfully on Ubuntu 13.10, lsusb identifies the
chipset as

RT3573 Wireless Adapter (Ralink)

and iwconfig assigns it:

ra0 Ralink STA

lsmod reports that the adapter is using the rt5572sta driver.

However, when I insert it into a Debian machine - whether its my Intel
Galileo running a full Debian image or my own Ubuntu PC running a Debian
live USB session - I'm having no luck. Dmesg identifies it with only:

usb 1-1: new high-speed USB device number 3 using ehci-pci

lsusb correctly sees it as:

ID 148f:3573 Ralink Technology, Corp. RT3573 Wireless Adapter

but that's where the fun stops. Here's iwconfig:

lo no wireless extensions.
eth0 no wireless extensions.

iw list gives me this rather cryptic message:

nl80211 not found

and the only remotely relevant reference in lsmod is

ehci-pci

I've installed firmware-ralink and searched for an appropriate rt5572sta
package. I found an rpm for OpenSuse here:

http://www.filewatcher.com/m/rt5572sta-common-2.6.1.3-6.3.noarch.rpm.15942-0.html

converted it to deb using alien and installed it, but there was no
change. (It was a long shot in any case.)
There is supposed to be a driver here:

http://www.mediatek.com/en/downloads/

but there's something wrong with their page and it doesn't actually
download (I've sent them an email for help).
Does anyone have any ideas?
Thanks so much!
Klaus
2014-02-27 10:33:52 UTC
Permalink
TP-Link N900 TL-WDN4200. Using it successfully on Ubuntu 13.10,
lsusb identifies the chipset as
RT3573 Wireless Adapter (Ralink)
ra0 Ralink STA
lsmod reports that the adapter is using the rt5572sta driver.
On the Ubuntu system, where the USB adapter is working, can you get
information about the loaded firmware? For example (sorry, I don't know
Ubuntu, so you might have to adapt the following) on Debian, with my
rather old USB wifi dongle attached, I see

$ grep -i firmware /var/log/syslog
Feb 27 10:16:58 chili kernel: [ 2969.061573] ieee80211 phy1:
rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'
Feb 27 10:16:58 chili kernel: [ 2969.073917] rt73usb 8-3:1.0: firmware:
direct-loading firmware rt73.bin
Feb 27 10:16:58 chili kernel: [ 2969.073929] ieee80211 phy1:
rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7
k

Also, modinfo shows which firmwares it'd load:

# modinfo --field firmware rt73usb
rt73.bin

$ locate rt73.bin
/lib/firmware/rt73.bin

Now, in your non-working system, do you have the matching firmware
files, and do they get loaded?
Have you searched for "linux firmware ralink rt3573"? Have you seen for
example this forum report which looks like Ralink doesn't know all
devices that use their chips, so their driver doesn't load the firmware
reliably? Maybe Ubuntu have updated the driver for the TP-Link device,
whereas Debian has not yet? (I leave the searching to you ;-)
--
Klaus
Klaus
2014-02-27 10:39:08 UTC
Permalink
Post by Klaus
this forum report
https://bbs.archlinux.org/viewtopic.php?pid=1164228#p1164228
--
Klaus
dclinton
2014-02-27 16:53:48 UTC
Permalink
Post by Klaus
TP-Link N900 TL-WDN4200. Using it successfully on Ubuntu 13.10,
lsusb identifies the chipset as
RT3573 Wireless Adapter (Ralink)
ra0 Ralink STA
lsmod reports that the adapter is using the rt5572sta driver.
On the Ubuntu system, where the USB adapter is working, can you get
information about the loaded firmware? For example (sorry, I don't
know Ubuntu, so you might have to adapt the following) on Debian, with
my rather old USB wifi dongle attached, I see
$ grep -i firmware /var/log/syslog
rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'
firmware: direct-loading firmware rt73.bin
rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7
k
# modinfo --field firmware rt73usb
rt73.bin
$ locate rt73.bin
/lib/firmware/rt73.bin
Now, in your non-working system, do you have the matching firmware
files, and do they get loaded?
Have you searched for "linux firmware ralink rt3573"? Have you seen
for example this forum report which looks like Ralink doesn't know all
devices that use their chips, so their driver doesn't load the
firmware reliably? Maybe Ubuntu have updated the driver for the
TP-Link device, whereas Debian has not yet? (I leave the searching to
you ;-)
Thanks, you've given me lots of great paths to pursue.

modinfo rt5572sta

on my Ubuntu machine told me:
===
filename:
/lib/modules/3.11.0-17-generic/kernel/drivers/net/wireless/rt5572sta.ko
version: 2.6.1.3
license: GPL
description: RT2870 Wireless Lan Linux Driver
author: Paul Lin <***@ralinktech.com>
srcversion: 0437D721DA31F3109C8F9D3
[...]
depends:
vermagic: 3.11.0-17-generic SMP mod_unload modversions
parm: mac:rt28xx: wireless mac addr (charp)
===
I copied that file over to my Debian machine into both

/lib/modules/3.8.7-yocto-standard/kernel/net/wireless

and

/lib/modules/3.8.7-yocto-standard/kernel/drivers/net/wireless

but

modprobe /route/to/rt5572sta.ko

returned:

FATAL: Module rt5572sta.ko not found

and insmod gave me:

Error: could not insert module rt5572sta.ko: Invalid module format

The trouble might be in vermagic (the Debian Galileo is running only
3.8.7). I could theoretically recompile from the original package, but
we need a system that will survive system updates and upgrades (these
devices will be operating remotely and we can't afford to lose them if
something breaks). By the way, there is a small possibility that I had
generated my Ubuntu driver from the original source package, but I'm
almost sure it just loaded on its own. Either way, that route won't help
for our Debian system. And that's the problem with the

https://bbs.archlinux.org/viewtopic.php?pid=1164228#p1164228

page you showed me. I really appreciate your help!
Klaus
2014-02-27 20:13:23 UTC
Permalink
Post by dclinton
I copied that file over to my Debian machine
Error: could not insert module rt5572sta.ko: Invalid module format
As you found by trial and error, you can't just copy kernel modules
between kernel versions.
As you also found out, your Debian installation on the Intel Galileo
board (did I guess this right?) runs a kernel version that has no
support for the Ralink chip in your wifi dongle.
As I can see it (but I'm by a long way no kernel expert), you've got few
options:

-- upgrade to a newer kernel (probably 3.12 or newer). Is there anything
available for your board?

-- download the source for the driver and compile it. On Stackexchange I
found this
<http://unix.stackexchange.com/questions/55987/ralink-rt5370-wireless-usb-dongle-not-working>
(although strictly speaking that artcle was about a different dongle):
<quote>
Anyhow, with ralink there are two ways to get your hardware to work. You
can use the kernel driver (rt2800usb) or build the staging driver
(ralink's version) with the source code from the website.
<\quote>


From having scanned through a few links, the "sta" part of the module
on your Ubuntu machine say it's a "staging" driver, i.e. something that
hasn't made it into the main kernel code yet. Whether or nor that
indicates it was compiled from the Ralink source or whether it came with
the kernel (where its source would have been in the staging tree) I
cannot tell.

Anybody more knowledgeable here able to chip in?
--
Klaus
Scott Ferguson
2014-02-27 21:25:13 UTC
Permalink
Post by Klaus
Post by dclinton
I copied that file over to my Debian machine
Error: could not insert module rt5572sta.ko: Invalid module format
As you found by trial and error, you can't just copy kernel modules
between kernel versions.
As you also found out, your Debian installation on the Intel Galileo
board (did I guess this right?) runs a kernel version that has no
support for the Ralink chip in your wifi dongle.
As I can see it (but I'm by a long way no kernel expert), you've got few
-- upgrade to a newer kernel (probably 3.12 or newer). Is there anything
available for your board?
-- download the source for the driver and compile it. On Stackexchange I
found this
<http://unix.stackexchange.com/questions/55987/ralink-rt5370-wireless-usb-dongle-not-working>
<quote>
Anyhow, with ralink there are two ways to get your hardware to work. You
can use the kernel driver (rt2800usb) or build the staging driver
(ralink's version) with the source code from the website.
<\quote>
From having scanned through a few links, the "sta" part of the module on
your Ubuntu machine say it's a "staging" driver, i.e. something that
hasn't made it into the main kernel code yet. Whether or nor that
indicates it was compiled from the Ralink source or whether it came with
the kernel (where its source would have been in the staging tree) I
cannot tell.
Anybody more knowledgeable here able to chip in?
More knowledgeable? No.
But my google-fu feels strong ;)

http://www.linuxforums.org/forum/wireless-internet/161550-rt3070sta-module-license-unspecified-taints-kernel-solved.html


Kind regards
dclinton
2014-02-28 15:06:17 UTC
Permalink
Post by Scott Ferguson
Post by Klaus
Post by dclinton
I copied that file over to my Debian machine
Error: could not insert module rt5572sta.ko: Invalid module format
As you found by trial and error, you can't just copy kernel modules
between kernel versions.
As you also found out, your Debian installation on the Intel Galileo
board (did I guess this right?) runs a kernel version that has no
support for the Ralink chip in your wifi dongle.
As I can see it (but I'm by a long way no kernel expert), you've got few
-- upgrade to a newer kernel (probably 3.12 or newer). Is there anything
available for your board?
-- download the source for the driver and compile it. On Stackexchange I
found this
<http://unix.stackexchange.com/questions/55987/ralink-rt5370-wireless-usb-dongle-not-working>
<quote>
Anyhow, with ralink there are two ways to get your hardware to work. You
can use the kernel driver (rt2800usb) or build the staging driver
(ralink's version) with the source code from the website.
<\quote>
From having scanned through a few links, the "sta" part of the module on
your Ubuntu machine say it's a "staging" driver, i.e. something that
hasn't made it into the main kernel code yet. Whether or nor that
indicates it was compiled from the Ralink source or whether it came with
the kernel (where its source would have been in the staging tree) I
cannot tell.
Anybody more knowledgeable here able to chip in?
More knowledgeable? No.
But my google-fu feels strong ;)
http://www.linuxforums.org/forum/wireless-internet/161550-rt3070sta-module-license-unspecified-taints-kernel-solved.html
That is an interesting possibility. However, part of our problem is that
we really don't want to have to rely on a compiled driver because we're
deploying remotely and we need to be able to depend on the device
surviving updates.
Thanks!
Post by Scott Ferguson
Kind regards
dclinton
2014-02-28 14:53:57 UTC
Permalink
Post by Klaus
Post by dclinton
I copied that file over to my Debian machine
Error: could not insert module rt5572sta.ko: Invalid module format
As you found by trial and error, you can't just copy kernel modules
between kernel versions.
As you also found out, your Debian installation on the Intel Galileo
board (did I guess this right?)
Bang on. Galileo is an amazing little platform that does *nearly*
everything we need. :)
Post by Klaus
runs a kernel version that has no support for the Ralink chip in your
wifi dongle.
As I can see it (but I'm by a long way no kernel expert), you've got
-- upgrade to a newer kernel (probably 3.12 or newer). Is there
anything available for your board?
No. 3.12 is the latest (and, I believe, only) Yocto image available.
I'm still digging, but no ringing bells yet.
Thanks!
Klaus
2014-02-28 15:16:32 UTC
Permalink
Post by dclinton
3.12 *OR* newer :-)
That's at least what I gathered from here:
<https://wikidevi.com/wiki/TP-LINK_TL-WDN4200>, though you also made it
working in your Ubuntu installation with kernel 3.11.
Post by dclinton
No. 3.12 is the latest (and, I believe, only) Yocto image available.
Only? Didn't you show us something with "3.8.7-yocto-standard" earlier? ;-)
Have you checked the USB dongle with the 3.12 kernel, maybe on another
Debian box (or virtual machine)?
From your earlier post it wasn't clear whether this usb dongle requires
any firmware?
--
Klaus
dclinton
2014-02-28 18:59:48 UTC
Permalink
Post by Klaus
Post by dclinton
3.12 *OR* newer :-)
<https://wikidevi.com/wiki/TP-LINK_TL-WDN4200>, though you also made
it working in your Ubuntu installation with kernel 3.11.
Post by dclinton
No. 3.12 is the latest (and, I believe, only) Yocto image available.
Only? Didn't you show us something with "3.8.7-yocto-standard"
earlier? ;-)
I never actually thought about that numbering. Now that you mention it
though, it seems to have nothing to do with the Linux kernel - Yocto
itself is meant to enable embedding kernel images in non-mainstream
hardware platforms.
Post by Klaus
Have you checked the USB dongle with the 3.12 kernel, maybe on another
Debian box (or virtual machine)?
From your earlier post it wasn't clear whether this usb dongle
requires any firmware?
I'm still not 100% sure, but I'm beginning to suspect that the dongle
does require firmware...which isn't good news.
Thanks,
Selim T. Erdogan
2014-03-13 14:50:23 UTC
Permalink
Post by dclinton
Post by Klaus
Post by dclinton
3.12 *OR* newer :-)
<https://wikidevi.com/wiki/TP-LINK_TL-WDN4200>, though you also
made it working in your Ubuntu installation with kernel 3.11.
Post by dclinton
No. 3.12 is the latest (and, I believe, only) Yocto image available.
Only? Didn't you show us something with "3.8.7-yocto-standard" earlier? ;-)
I never actually thought about that numbering. Now that you mention
it though, it seems to have nothing to do with the Linux kernel -
Yocto itself is meant to enable embedding kernel images in
non-mainstream hardware platforms.
I don't know much about Yocto, but www.yoctoproject.org/downloads
doesn't show anything that looks like 3.8.7. So I think that number
must refer to the linux kernel and you should make sure you're trying
out the dongle on your Galileo when it's running the latest (3.12)
image.

There are usually two drivers for Ralink devices: one from the
manufacturer, and one from the rt2x00 project. The driver you showed
working in Ubuntu was from the manufacturer, which is not part of the
mainline linux releases. I think your device is also supported
by the rt2x00 project (see below) but maybe not by the kernel you're
using. From my experience, if it were just a missing firmware issue,
you might see something more in dmesg output, trying to load the
correctly identified driver but complaining about missing firmware files.

I think the rt2x00 driver supports your dongle, based on messages on
their mailing list:

- It looks like your devices usb id got added in July 2013
http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2013-July/006283.html

- Some people report using very similar (one maybe the same?) devices
recently (November and February), though with problems using hostapd
http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2013-November/006525.html
http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2014-February/006553.html
http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2014-February/006555.html

Anyway, you might get better help writing to the rt2x00 list, or maybe
try e-mailing the specific people who wrote the messages above what they
did to get their devices working. (It's not a very active list.)
List info:
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com
Archives:
http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/

Selim
Post by dclinton
Post by Klaus
Have you checked the USB dongle with the 3.12 kernel, maybe on another
Debian box (or virtual machine)?
From your earlier post it wasn't clear whether this usb dongle
requires any firmware?
I'm still not 100% sure, but I'm beginning to suspect that the
dongle does require firmware...which isn't good news.
Thanks,
Loading...