PDA

View Full Version : Weird wireless connecting behavior - Help please


Hamsterkill
2006-06-07, 12:43 PM CDT
Okay, been working on this problem for a couple days now and I've reached a dead-end. Searched the forums and couldn't this problem exactly.

I use the rt2570 driver for my wireless adapter and it seems to work fine. The problem is that it won't connect to my network on bootup. In fact, using nothing but the graphical system-config-network, it takes two or three activations once I'm logged in to connect. What it gives me on bootup (and the failures once I'm logged in) is:

Error for wireless request "Set Bit Rate" (8B20) :
SET failed on device rausb0 ; Network is down.

Determining IP information for rausb0... failed

After a couple tries at activating once I'm logged in it will connect, without my altering any settings at all. Weird, huh?

Now comes the weirder part for me. In experimenting, I disabled it at boot-time. Once I was logged in, I did: ifconfig rausb0 up
iwlist rausb0 scanning Because I thought maybe it was delayed in finding my network for some reason -- it wasn't -- my network was found perfectly. Immediately following this, I went and activated the connection with the graphical system-config-network. Now I got an immediate connection. I was confused so I rebooted (again with the connection disabled) and did "ifconfig rausb0 up" again, did not scan at the terminal, and went to activate in system-config-network. Again i got an immediate connection. The other thing is that after using the ifconfig command to bring it up, I don't get that SET failed error. I just get: Determining IP information for rausb0... And then it connects. If I can provide any more logs or outputs, let me know.

I really would like to be able to get my wireless to connect at boot-time, any replies are appreciated.

MAnix
2006-06-07, 01:43 PM CDT
As root type these followed by RETURN key:
/sbin/depmod -a
/sbin/modprobe ndiswrapper
/sbin/iwconfig
/sbin/iwlist wlan0 scan
/sbin/iwconfig wlan0 essid ESSID (By the way the essid in upper case should be replaced by the network id like "linksys_54g" or whatever. this can be seen when you type in scan, and the essid is listed next to the access point of choice)
iwconfig wlan0 mode Managed

then finally:
/sbin/ifconfig wlan0 up
or
/sbin/dhclient wlan0 (i do this one, but depends on which you have on system)
or
/sbin/dhcpcd wlan0


try the above and post the outcome. BTW this is how to raise your network using the command line...

Post all errors and also the output of lspci, and i shall see if i can help here...

Hamsterkill
2006-06-07, 02:34 PM CDT
Thanks, here goes.

This is all I typed at my terminal as root.
iwconfig rausb0 essid myEssid key s:mySecretKey
dhclient rausb0
Successfully connected to my network without any output.

I do not think lspci would be helpful here since my network adapter is usb.

I am not using ndiswrapper by the way, as i said I am using the rt2570 driver from the rt2x00 project.

Hope this sparks some ideas as to why I can't get my network to start on boot. I am still confused as hell.

MAnix
2006-06-07, 03:11 PM CDT
lsusb, is what you use in place of lspci and is from the wireless-tools package, for outputting usb devices...might be worth installing this incase you ever get problems with your wireless.

as for getting the internet on boot, if those commands bring the internet up then you can simply add those lines, by editing /etc/profile, with just those lines. then everytime you log in it activates the wireless, and when you log out it disables it...hope this helps.

My /etc/profile looks like this:
# /etc/profile

# System wide environment and startup programs, for login setup

# Wireless initiation goes here
/sbin/depmod -a
/sbin/modprobe ndiswrapper
/sbin/iwconfig
/sbin/iwconfig wlan0 mode Managed
/sbin/iwconfig wlan0 essid licari
/sbin/dhclient wlan0

SO for you simply place the two commands before the main functions and under the "System wide..." section. a # is a comment, and thus is skipped over, so just type your commands free of anything other than the commands themselves as you need them so for you it should read:
# /etc/profile

# System wide environment and startup programs, for login setup

# Wireless initiation goes here
/sbin/iwconfig rausb0 essid myEssid key s:mySecretKey
/sbin/dhclient rausb0

BTW i had trouble with a USB adapter and it starting on boot, but it is simply to do. you just add it to the file i said above. thus everytime you log on then you have the services running, without fail... This is what you want, and this will do it no problem.

MAniX

Hamsterkill
2006-06-07, 04:52 PM CDT
Okay, did that. Don't think that's what I want though...

On my next reboot, gdm was delayed in starting, I saw my wireless driver doing stuff on a text login screen instead... and I got the same SET error as I did earlier. After a few minutes, it looked like the wireless tried again and got a connection and then gdm came up. A couple minutes later I lost my connection (not a signal strength issue). I was able to restablish the connection with stability, however, both on the initial connection and the stable one, it gave me a different IP than it had given me every other time (not that really care much about what IP address it gives me... just strange I thought).

Also, yeah I had lsusb back on my gentoo system and was wondering how to get. Your post reminded me to look. However it is not in the wireless-tools package -- it is from the usbutils package.
/sbin/lsusb
Bus 002 Device 006: ID 124b:4d01 Nyko (Honey Bee) Airflo EX Joystick
Bus 002 Device 005: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 002 Device 001: ID 0000:0000
Bus 002 Device 004: ID 047d:1030 Kensington
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 002: ID 148f:2570 Ralink Technology, Corp. 802.11g WiFi
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 058f:9360 Alcor Micro Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000

Hamsterkill
2006-06-07, 08:04 PM CDT
Okay... I have it doing what I want now. It's a hack-job solution, but it works. What I did was I made a 1-liner script called mynet in /etc/init.d/ and make it executable:/sbin/ifconfig rausb0 up
chmod 744 /etc/init.d/mynet
This was from the knowledge I had that I included in my first post that after an ifconfig up, ifup (the network script fedora uses for everything) works immediately. Then, I created a symolic link to it in /etc/rc.d/rc5.d/ named S09mynet
ln -s /etc/init.d/mynet /etc/rc.d/rc5.d/S09mynet
The "S09" in the name is to make it run right before the networking setup in boot-time (it comes from how the rc#.d folders are setup. You can create more links in the other rc# folders wherever you need to -- rc5 is my default and the default for an installation of Fedora Core. I then was able to enable the start on boot option in system-config-network graphical tool and have my network come up on boot.

This is not a real "solution" to the problem... but its a makeshift fix that works for me.

Thanks to MAnix for trying to help and sparking the idea of making my own init script.

theflyingboy
2006-09-09, 05:35 PM CDT
I've been looking for the solution to the same problem. I'm with

FC5 (2.6.15)
D-Link DWL-G122 (rev. B1)
rt2570-1.1.0-b2 from rt2x00.serialmonkey.com

and it works great.

Thanks!!!

gesho
2006-09-20, 10:21 PM CDT
i also have problems with iwconfig, it wprks halftime.
fedora package supports up to v19, while recent ndis compiles under v20 wireless extensions.
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
recent 28 should also be supporting v20, but fedora binary doesn't

[root@localhost wireless_tools.28]# rpm -qa | grep wireless
wireless-tools-28-0.pre13.5.1
[root@localhost wireless_tools.28]# iwconfig -v
iwconfig Wireless-Tools version 28
Compatible with Wireless Extension v11 to v19.

Kernel Currently compiled with Wireless Extension v20.

wlan0 Recommend Wireless Extension v18 or later,
Currently compiled with Wireless Extension v20.

[root@localhost wireless_tools.28]#