LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 11-26-2005, 02:34 PM   #1
leupi
Member
 
Registered: Mar 2004
Location: Annapolis, Maryland, USA
Distribution: Ubuntu 11.04, Mint 11.11, Xubuntu 11.11
Posts: 457

Rep: Reputation: 30
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.

Thanks.

Todd
 
Old 11-26-2005, 03:25 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Moved: This thread is more suitable in Wireless Networking and has been moved accordingly to help your thread/question get the exposure it deserves.

You should be able to run:
iwconfig DEV essid YOURESSID

Just change DEV for your ethernet device and YOURESSID for your access point essid.
 
Old 12-10-2005, 07:50 AM   #3
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
Hi

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.
 
Old 12-11-2005, 11:51 PM   #4
tskears
Member
 
Registered: Apr 2005
Location: Ottawa, Canada.
Distribution: PCLinuxOS.
Posts: 122

Rep: Reputation: 15
Can't you re-establish the connection using KInternet?
 
Old 12-12-2005, 07:48 AM   #5
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
Hi
Thanks for the response.

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?
 
Old 12-13-2005, 12:55 PM   #6
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
Was that post too long? or can no one shed any light on this?

How do I get linux to automatically re-establish a wireless connection to my AP if the link gets dropped?
 
Old 12-15-2005, 02:35 AM   #7
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
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.

Last edited by rtozer; 12-15-2005 at 08:40 AM.
 
Old 01-01-2006, 04:04 PM   #8
quackyo
LQ Newbie
 
Registered: Aug 2005
Posts: 16

Rep: Reputation: 0
I have the exact same problem - I've sat up a link between a WLAN and a wired network, using FC4 to route between this WLAN and the wired network.

a reboot (and surely a iwconfig essid ID) fixes the connection.
 
Old 01-01-2006, 04:52 PM   #9
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
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.
 
Old 01-01-2006, 04:59 PM   #10
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
excuse the double post, but here is some more info:

Card: Mentor WLG-PCI/II (802.11b/g)
Chipset: Ethernet controller: Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11b/g Wireless (rev 03)
pciid: 11ab:1faa (rev 03)
Driver: mrv8335 (http://www.marvell.com/drivers/drive...?dId=122&pId=3)

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.
 
Old 01-05-2006, 11:18 AM   #11
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 588

Rep: Reputation: 45
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.

Best,
Ott
 
Old 01-05-2006, 03:50 PM   #12
rtozer
LQ Newbie
 
Registered: Dec 2005
Location: UK
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
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.
 
Old 01-06-2006, 01:32 AM   #13
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 588

Rep: Reputation: 45
Yeah. Drivers are a problem.

You may still try ifplugd. If it can reconnect in seconds, perhaps it will do for you.

Best,
Ott
 
Old 02-16-2014, 12:34 PM   #14
DougD
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
test for connection and reconnect wifi automatically

I realize this is an old thread that was moved but when I do a search this is the thread that shows up so I wanted to post the answer here.

I found the following script at sirlagz.net/2013/01/10/script-wifi-checker-script/

just create a new file
vi /root/checkwanup
#!/bin/bash

wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l`
if [ $wlan -eq 0 ]; then
/sbin/ifdown wlan0 && /sbin/ifup wlan0
else
echo interface is up
fi

then chmod 555 /root/checkwanup
and add it to your crontab
crontab -e
*/15 * * * * /bin/bash /root/checkwanup
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora C2 - Wireless network drivers? Broadcom 802.11g Network Adapter FragTek Linux - Wireless Networking 7 01-22-2010 12:10 AM
Network Configuration Hanging in FC4 After Using Wireless Network Wizard Trip in VA Linux - Wireless Networking 2 07-18-2005 08:32 AM
Wireless Network auto reconnect brim4brim Linux - Newbie 0 06-22-2005 11:06 PM
how to I have my box automaticall reconnect to my wireless network after it dies? JackSmith Linux - Newbie 1 06-11-2005 11:58 PM
Network speed problems on 15 user network to broadband wireless router AntWarrior Linux - Wireless Networking 2 12-02-2004 11:05 AM


All times are GMT -5. The time now is 02:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration