Won't work if the device is plugged in at boot time

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4465

doctor_regtools

27-11-2007 20:29:30

Hello there,

I am trying to get the Bluenext BN-WD54G working on Ubuntu (Gusty Gibbon).

It does seem to work, as long as I don't have it plugged in when I boot the machine up and log in. I can then plug it in and everything works fine.

However if I have it plugged in when I boot, wlan0 is enabled but not working correctly

wlan0 Link encapEthernet HWaddr 0019E0674DD7
BROADCAST MULTICAST MTU1500 Metric1
RX packets0 errors0 dropped0 overruns0 frame0
TX packets0 errors0 dropped0 overruns0 carrier0
collisions0 txqueuelen1000
RX bytes0 (0.0 b) TX bytes0 (0.0 b)

and iwlist wlan0 scan returns no results. If I boot up, log in and plug in the adapter I get

wlan0 Link encapEthernet HWaddr 0019E0674DD7
inet addr192.168.5.5 Bcast192.168.5.255 Mask255.255.255.0
inet6 addr fe80219e0fffe674dd7/64 ScopeLink
UP BROADCAST RUNNING MULTICAST MTU1500 Metric1
RX packets121 errors0 dropped0 overruns0 frame0
TX packets50 errors0 dropped2 overruns0 carrier0
collisions0 txqueuelen1000
RX bytes14523 (14.1 KB) TX bytes7774 (7.5 KB)

I've tried what I think are the obvious things - copying rt73.bin to /lib/firmware

and adding

blacklist rt73usb
blacklist rt2570

to /etc/modprobe.d/blacklist

Of course all this would be manageable if I could update things when I've logged in but I can't get this working. If I run 'ifconfig wlan0 down', I get no error wlan0 still seems to be enabled (ifconfig -a returns the same results). Unfortunately this seems to prevent me from doing the requested debugging.

I am using a recent nightly download (rts-cvs-2007112510)

modinfo rt73.ko returns 'modinfo count not find module rt73.ko)
uname -a returns 'Linux 2.6.22-14-generic #1 SMP'

Any suggestions gratefully received! Thanks

IvD

27-11-2007 21:35:15

Try enabling the interface
ifconfig wlan0 up

doctor_regtools

27-11-2007 22:22:40

Try enabling the interface
ifconfig wlan0 up[/quote3n5wzk4a]

Thanks - I get the error

SIOSCIFFLAGS No buffer space available

Oh - and minor update (not sure if this is relevant or not). It actually seems to work after a reboot, but not after a switch off / switch on of the PC.

Starcrasher

27-11-2007 23:50:51

modinfo rt73.ko returns 'modinfo count not find module rt73.ko)[/quote163gwo8a]
modinfo rt73 will certainly give a better result. wink

IvD

28-11-2007 18:40:37

What does "dmesg" report?

doctor_regtools

28-11-2007 19:56:26

modinfo rt73.ko returns 'modinfo count not find module rt73.ko)[/quote25par7bd]
modinfo rt73 will certainly give a better result. wink[/quote25par7bd]

d'oh! sorry

filename /lib/modules/2.6.22-14-generic/extra/rt73.ko
license GPL
description Ralink RT73 802.11abg WLAN Driver 1.0.3.6 CVS 2007112510
author http//rt2x00.serialmonkey.com
srcversion 2F2BE69EAF2696F08B86AC6
alias usbv1740p7100d*dc*dsc*dp*ic*isc*ip*
alias usbv2019pAB50d*dc*dsc*dp*ic*isc*ip*
alias usbv2019pAB01d*dc*dsc*dp*ic*isc*ip*
alias usbv0769p31F3d*dc*dsc*dp*ic*isc*ip*
alias usbv0DF6p90ACd*dc*dsc*dp*ic*isc*ip*
alias usbv0DF6p9712d*dc*dsc*dp*ic*isc*ip*
alias usbv18E8p6238d*dc*dsc*dp*ic*isc*ip*
alias usbv18E8p6229d*dc*dsc*dp*ic*isc*ip*
alias usbv18E8p6196d*dc*dsc*dp*ic*isc*ip*
alias usbv148Fp2671d*dc*dsc*dp*ic*isc*ip*
alias usbv148Fp2573d*dc*dsc*dp*ic*isc*ip*
alias usbv0DB0pA874d*dc*dsc*dp*ic*isc*ip*
alias usbv0DB0pA861d*dc*dsc*dp*ic*isc*ip*
alias usbv0DB0p6874d*dc*dsc*dp*ic*isc*ip*
alias usbv0DB0p6877d*dc*dsc*dp*ic*isc*ip*
alias usbv13B1p0023d*dc*dsc*dp*ic*isc*ip*
alias usbv13B1p0020d*dc*dsc*dp*ic*isc*ip*
alias usbv06F8pE020d*dc*dsc*dp*ic*isc*ip*
alias usbv06F8pE010d*dc*dsc*dp*ic*isc*ip*
alias usbv1472p0009d*dc*dsc*dp*ic*isc*ip*
alias usbv1044p800Ad*dc*dsc*dp*ic*isc*ip*
alias usbv1044p8008d*dc*dsc*dp*ic*isc*ip*
alias usbv15A9p0004d*dc*dsc*dp*ic*isc*ip*
alias usbv07D1p3C04d*dc*dsc*dp*ic*isc*ip*
alias usbv07D1p3C03d*dc*dsc*dp*ic*isc*ip*
alias usbv14B2p3C22d*dc*dsc*dp*ic*isc*ip*
alias usbv1371p9032d*dc*dsc*dp*ic*isc*ip*
alias usbv1371p9022d*dc*dsc*dp*ic*isc*ip*
alias usbv1631pC019d*dc*dsc*dp*ic*isc*ip*
alias usbv050Dp905Cd*dc*dsc*dp*ic*isc*ip*
alias usbv050Dp905Bd*dc*dsc*dp*ic*isc*ip*
alias usbv050Dp705Ad*dc*dsc*dp*ic*isc*ip*
alias usbv050Dp7050d*dc*dsc*dp*ic*isc*ip*
alias usbv0411p00F4d*dc*dsc*dp*ic*isc*ip*
alias usbv0B05p1724d*dc*dsc*dp*ic*isc*ip*
alias usbv0B05p1723d*dc*dsc*dp*ic*isc*ip*
alias usbv1690p0722d*dc*dsc*dp*ic*isc*ip*
alias usbv07B8pB21Dd*dc*dsc*dp*ic*isc*ip*
depends usbcore
vermagic 2.6.22-14-generic SMP mod_unload 586
parm debugDebug mask n selects filter, 0 for none (int)
parm ifnameNetwork device name (default wlan%d) (charp)
parm firmNamePermit to load a different firmware (default rt73.bin) (charp)

doctor_regtools

28-11-2007 19:59:09

What does "dmesg" report?[/quote2lsg2rj6]

thanks - attached

Starcrasher

28-11-2007 20:13:37

It seems you forgot to blacklist the driver shipped by your distribution,
so rt2500usb is loaded at startup and conflict.

Another driver loaded is iwlwifi. If you don't have another card which works with this driver, you maybe want to blacklist it too.

doctor_regtools

28-11-2007 21:39:21

It seems you forgot to blacklist the driver shipped by your distribution,
so rt2500usb is loaded at startup and conflict.

Another driver loaded is iwlwifi. If you don't have another card which works with this driver, you maybe want to blacklist it too.[/quote3w3ywksm]

Yay - thank you - blacklisting rt2500usb did the job. I guess this section is what told you this?

[ 62.362636] wmaster0 Selected rate control algorithm 'simple'
[ 62.727476] usbcore registered new interface driver rt2500usb
[ 63.074167] rtusb init ====>
[ 63.074446] usbcore registered new interface driver rt73
[ 63.385919] phy0 -> rt2500usb_enable_radio Error - Register initialization failed.

I didn't see anything in the documentation about this, and I just checked again. Is anything there? Otherwise it might be worth adding something to prevent noobs like me bothering you?

Thanks for the help!

Starcrasher

28-11-2007 23:42:37

I guess this section is what told you this?[/quote1urjxeya] Exact.

I think it's not in the documentation of the driver because it seems obvious that you can't have two drivers doing similar job at same time for a unique piece of hardware. wink

Anyway, distributions that include the two drivers should have tools to let you choose the one you want to use and blacklist the other. At least, they should document it.

doctor_regtools

30-11-2007 20:18:32

I guess this section is what told you this?[/quote2hrutjrj] Exact.

I think it's not in the documentation of the driver because it seems obvious that you can't have two drivers doing similar job at same time for a unique piece of hardware. wink
[/quote2hrutjrj]

Err OK, I guess - I didn't know I had another driver doing a similar job, let alone how to identify it.

Anyway, sorry to be annoying and thanks for the help.

All the best

doctor_regtools

02-12-2007 21:37:56

Me again - sorry!

I have also tried the card with xubuntu on the same hardware and unfortunately get a different problem (

What seems to happen is that when I connect the card I am able to connect fine (I can ping various web sites for example) but when I start up a web browser my ping breaks.

Attached is the new dmesg file. I'm not really sure exactly what I should be blacklisting from this - assuming this is the problem again.

Thanks again for any help.

Starcrasher

03-12-2007 12:43:32

On this computer, there is no legacy driver installed or it is blacklisted.
Therefore, the new rt2x00 driver is used (without any success cry ).

You will need to compile and install the legacy rt73 driver module.
And then, apply the same solution as above.

doctor_regtools

03-12-2007 21:55:40

On this computer, there is no legacy driver installed or it is blacklisted.
Therefore, the new rt2x00 driver is used (without any success cry ).

You will need to compile and install the legacy rt73 driver module.
And then, apply the same solution as above.[/quote1zob7bpf]

Thanks - ok there was a pretty basic error (I suck). I though I'd installed but as it turns out not in the right place - Ubuntu seemingly using non-standard paths.

Anyway I installed it in the right place (I think) and still I get a connection with ping and then it breaks when I fire up firefox. A new dmesg output is attached. I've tried blacklisting the obvious things ... guess I've missed the correct one?

Starcrasher

04-12-2007 10:32:12

The new rt2x00 driver rt73usb is still used. Maybe you forgot to blacklist it.

doctor_regtools

04-12-2007 10:35:22

The new rt2x00 driver rt73usb is still used. Maybe you forgot to blacklist it.[/quotexyv03o3f]

Thanks - I did try balclisting 'rt73usb' but then I got absolutely nothing, even though modinfo rt73 returned some information

Starcrasher

05-12-2007 11:15:24

Then, you should try "modprobe rt73".
If it's not working, have a look at /etc/modprobe.conf file and see if there is an alias for wlan0.
There should be only one alias wlan0 rt73[/color3moj26ab]. If you find another alias for wlan0 try to comment it with a #[/color3moj26ab].

If it doesn't help, there's probably a problem with your rt73 module installation. You said that you installed the driver in another location.
Did you move it manually ? Have you then use depmod command to refresh module dependencies.
If you installed it another time, did you remove the previous one before doing it?

doctor_regtools

08-12-2007 17:34:14

Thanks Starcrasher

I've now done a reinstall - editing the path in Makefile.
dmesg now reports 'registered new interface driver rt73' whcih I guess is good.
modprobe rt73 returns nothing - which I guess is encouraging
I've run depmod
/etc/modprobe.com has just one line 'alias wlan* rt73'
Which all seems good, except

iwlist wlan0 scan tells me that the Interface doesn't support scanning (which I'm sure it does as it did on a different OS)

I've not removed the previous installations - because err, well, umm, I'm not really sure how I'd go about doing this.

I've also tried the debugging suggested in TESTING but there wasn't much output from that - perhaps I need to do this again and report what it's reporting?

Thanks again for the help

Starcrasher

09-12-2007 13:54:34

I've not removed the previous installations - because err, well, umm, I'm not really sure how I'd go about doing this.[/quoteh3kbvqce]You really should have done it, before reinstalling.
Try to see what the result of the command locate rt73.ko[/colorh3kbvqce] (as root).
It will look for every file on your system that contains rt73.ko in its name and display the list will full paths.
You should not have more than one in each kernel module tree.

I've now done a reinstall - editing the path in Makefile. .... I've run depmod[/quoteh3kbvqce]That's the good way to do it. And, if you have read the Makefile, you've certainly seen that the depmod command is done when running make install[/colorh3kbvqce]. Therefore, it's only necessary to use depmod, if and after you make change to the kernel module tree manually. (i.e. add remove or move a module)

dmesg now reports 'registered new interface driver rt73' which I guess is good.
modprobe rt73 returns nothing - which I guess is encouraging[/quoteh3kbvqce]Good ! It's seems the driver is loaded at boot time. D

/etc/modprobe.com has just one line 'alias wlan* rt73'[/quoteh3kbvqce]That's working but doesn't sound good.
This distribution seems to use files in /etc/modprobe.d folder. Maybe /etc/modprobe.conf should not be used. We saw, in the past some case where it was a problem. (Files in /etc/modprobe.d folder were not read when /etc/modprobe.conf exists.) I hope, it's not your case.
Anyway, try to see with your distribution documentation.


iwlist wlan0 scan tells me that the Interface doesn't support scanning (which I'm sure it does as it did on a different OS)[/quoteh3kbvqce] Remember what IVD said at the beginning of this thread. The interface must be up before scanning. Have you try to connect manually ?

Vern

10-12-2007 02:03:28

FWIW, the latest CVS uses /etc/modprobe.d/ralink for the alias when built in a 2.6 kernel environment.
This distribution seems to use files in /etc/modprobe.d folder.[/quote1hk7yw8i]
/etc/modprobe.conf should be removed, or - if you have other stuff in it - include /etc/modprobe.d should be added to it.

doctor_regtools

13-12-2007 21:04:38

[Please see update at the bottom]

Thanks for the help guys and sorry for not responding quicker, I've been offline for a few days (shocking I know).

I've followed all the advice given above (I think), downloaded the latest, done some more research and things are looking a bit better.

Basically, when the system starts up, I find I get

wlan0 No scan results

and what I have to do is go in to the Module directory and go through the following

ifconfig wlan0 down
rmmod rt73
insmod rt73.ko
ifconfig wlan0 up

and then I can at least see my router on the connection list. If I miss out the rmmod rt73.ko step I get the error

insmod erro inserting rt73.ko -1 File Exists

Which suggests to me there is a 'bad' rt73.ko around somewhere, but I've done a scan of the entire file system and the only rt73.ko is the file I put on there.

I've done an update-modules but that didn't seem to help.

Oh, my system doesn't have an /etc/modprobe.conf but does have /etc/modprobe.conf/ralink which has 'alias wlan* rt73' in it.

Again thanks for the help and hopefully we are close. I guess I could create a file in /etc/rc?.d to cover the above but it would be nice not to have to.

UPDATE

A bit more progress. It turns out that if I type 'sudo ifconfig wlan0 up' after boot, then the scan does return results.

I think I was confused because if I type the above and then

iwlist wlan0 scan

I get 'No scan results' but

sudo iwlist wlan0 scan

returns the results, and after this iwlist wlan0 scan (without the sudo) also returns the results. My brain hurts.

Spy84464

17-12-2007 18:59:37

Hello,
If you don't run "iwlist wlan0 scan" as root (with sudo), no actual scanning is performed and the data the device (or the driver) cached from a previous scan are returned in that case.

Hope that helps,
Romain

doctor_regtools

19-12-2007 21:42:59

Thanks again - things seem to be getting better but ...

when I try to connect I get 'wlan0ava' appearing with

wlan0ava Link encapEthernet HWaddr 0019E0674DD6
inet addr 169.254.8.118 Bcast 169.254.255.255 Mask255.255.0.0
UP BROADCAST MULTICAST MTU 1500 Metric1

This is the same mac address that appears when I enter 'lshw -C network'

Googling (http//ubuntuforums.org/showthread.php?t=469862) suggested this indicates a problem with DHCP, so I tried manual IP address configuration instead. With this the output of ifconfig -a looks hunkey-dorey but I can't actually ping the router.

Sorry if I'm being thick!

doctor_regtools

19-12-2007 22:04:35

Currently looks like it might be an IPv6 issue, asa I see this in my logs

"wlan0 no IPv6 routers present"

and I guess my router isn't IPv6. I've done my best to disable IPv6 in the OS but to no avail so far.

FWIW I'm using rt73-cvs-2007121313

doctor_regtools

19-12-2007 22:36:21

Yet another update - if I disable security on the router it works. Previously I was using WPA-PSK

Spy84464

22-12-2007 11:47:28

Except posting a debug trace, I don't know what to suggest. The ipv6 thing is not a problem, it is just an informative message.

shahrukh86

16-08-2008 15:31:35

thank u