Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 11.04, Mint 11.11, Xubuntu 11.11
Posts: 458
Rep:
Reconnect to wireless network
I have a wireless network at my house and on occasion I have to turn off the wireless access point. When I turn it back on how do I reconnect the laptop to the access point? I have FC4 on the laptop and I can't seem to find any kind of wireless manager and it does not seem to log back on by itself. Right now I reboot the laptop but I'm sure that that is a bit of an extreme measure...
The access point is not WEP or WPA protected, all I have is MAC filtering but as I am pretty isolated from other houses that really is not an issue for me.
Was this issue ever resolved?
I have exactly the same problem.
Everything works perfectly except the link gets dropped occasionally. And then it doesn't reconnect.
Yes, typing iwconfig DEV essid YOURESSID re-establishes the connection. But that is just insane. Why doesn't it automatically attempt to reconnect when the link is lost? And continue to try until it manages to reconnect...
Google turned up several threads around the net with this issue but no one ever seems to be able to resolve it. The closest I've seen to a solution involved running NetworkManager which I tried. Not a healthy program that one. I couldn't get it to do anything other than break my system.
Surely there is a simple way to make a wireless connection automatically reconnect to the same access point if the link gets dropped.
What is KInternet? I don't seem to have any such app.
I am running fedora core 4. All the latest packages.
There is nothing wrong with my internet connection though. Jut the wifi link to my router.
My XP machine in the same room almost never drops the link and of course reconnects immediately if it does. Windows reads 4/5 bars and linux reads 100/100 link quality and the signal to noise ratio looks fine. Yet the linux machine gets dropped quite regularly. It survived all last night but has lost the link 3 times in the last hour. And since that machine is a web server this is not a good thing.
The link being dropped is not the issue I want to resolve here (though I will be looking into that too). I just want to know how to get linux to re-establish the link automatically if it gets dropped.
Should it do that automatically? Is something broken here that its not? Or does it not reconnect and no one knows why or how to fix it?
I did a yum update the other day (from the livna repository). It downloaded 1.3 gig so a major update took place. I downloaded the new matching 16k stack kernal from linuxant and recompiled ndiswrapper on that. My connection works fine. I just have to manually reconnect it if the link dies. Did the update break something?
When the link gets dropped (ethtools wlan0 shows Link detected:no) iwconfig reports all the correct info except the essid is changed from my essid to "off/any" and the AP MAC address is all 0s. Simply setting the essid to my essid re-establishes the connection to the AP. Is this the cause of the problem. It works fine at boot time so is in the correct config file ifcfg-wlan0 in network-scripts. Is there somewhere I have to tell it no to switch to off/any when the link is lost?
Update:
I have this issue back to front.
The link going down is not the cause of the loss of the AP and ESSID values.
I broke the link manually to test and it reconnected fine.
So it seems that the system is randomly resetting the ESSID value to "off/any" and so dropping the link.
Indeed iwconfig wlan0 essid ID re-establishes the connection. As would a reboot. But it happens often. Several times a day at least. And sometimes it gets into it really bad and won't stay connected for more than a few seconds before dropping it again. I created a script which I run with cron every 5 mins, it checks the connection and re-establishes it if its down. But this setup is just FAR too unstable to be of any practical use. Especially on a web server. I'm going to have to either find a card with native drivers or switch to a wired lan. Or perhaps I can take it up with the authors of ndiswrapper. I rebuilt ndiswrapper with debug=6 and have a few days of debug messages now. Unfortunately all it shows is something along the lines of "setting link=0". There is no error or activity, the driver just decides its no longer connected.
I tried ndiswrapper 1.7, it was much worse than 1.5 so reverted to 1.5. And the system froze the other day on the latest kernel (2.6.14-1.1653_FC4.stk16). So for now I've dropped back to the most stable combination of ndiswrapper (1.5) and FC4 kernel (2.6.14-1.1644_FC4.stk16). Note these are the 16k stack versions of the FC4 kernels from Linuxant, the default 4k stack versions don't appear to be any less stable but ndiswrapper warns that the kernel only has a 4k stack and recommends recompiling with 16k.
The system is fairly stable now and seldom crashes, but the wireless link is hopeless.
How looks your /etc/network/interfaces configuration? Have you specified essid, wep key etc.?
ifplugd is a smart daemon which is able to automatically re-connect. You should config the network in /etc/network/interfaces and ifplugd should do the job. It works fine on my debian box, haven't tried with wireless though.
there are several specific tools for wireless, e.g. waproamd.
Hi otoomet
Thanks for the response.
My essid, WEP key etc are all configured in the correct files. It connects correctly when the machine boots up. If the router is reset the connection is re-established afterwards. It is some fault of the driver. The essid gets reset to "off/any" randomly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.