You are not logged in.

#1 2009-10-09 20:19:26

greylogic
Member
Registered: 2009-08-15
Posts: 14

Automatic restart of network after a connection drop

Hi,

I am having problem with my wireless connection frequently getting dropped (randomly). I have posted a thread here.
http://bbs.archlinux.org/viewtopic.php?pid=627067

seems many others using the intel 3945ABG wireless card are having the same issue. Thinking this was due to DHCP, yesterday I added a static IP mapping in my router and configured the static ip in my rc.conf

I am able to access internet now. However the problem doesn't seem to go away. I am still experiencing random connection drops. so i was thinking of writing a small script which can periodically poll for the network status using cron and restart network (invoke /etc/network restart) if required.

but i consider polling inefficient and slow(delay in automatic reconnection based on the poll interval). so i am looking for other better ways to implement this. Is there any other package or configuration available which can automatically restart my network when the connection gets dropped.

Is there any way to hook into to connection drop process (like a callback which gets called when the connection gets dropped). I can write/read code. but my knowledge of the available features is very limited. your help is appreciated.

Last edited by greylogic (2009-10-09 20:23:48)

Offline

#2 2009-10-09 22:47:49

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Automatic restart of network after a connection drop

Hmm, what you could do is create a script that ran a ping test every so often and look at the received packets.  Put it in a while loop then restart your network if the condition isn't met.

http://steve-parker.org/sh/loops.shtml


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#3 2009-10-10 03:12:36

greylogic
Member
Registered: 2009-08-15
Posts: 14

Re: Automatic restart of network after a connection drop

Hi,

  I have no trouble in detecting connection drop using a shell script. I can read the contents of /sys/class/net/wlan0/wireless/link
It gives the signal strength and will be 0 when the network is down (i guess). But i am looking for some way to not do this in a loop. Using a loop or cron requires this script to be run periodically.

I am looking for some kind of hook or a call back system if available.

Last edited by greylogic (2009-10-10 03:13:11)

Offline

Board footer

Powered by FluxBB