Unstable wireless connection; any better solutions?

Atheros wireless card, FreeBSD 8.2.

Everything works, except one problem: it will disconnect after a certain period of time (10 mins, for example). To reconnect, I have to use
Code:
dhclient wlan0
.

To simplify the task, I wrote a simple shell script which basically repeats the above commands every 5 mins, to make sure that I can have consistent wireless connection. I set the shell script auto-run whenever the system starts. It works, but I feel it's kind of dumb. Unfortunately, I don't know any other solutions.

Is there a better/cleaner way to solve this problem?
 
Check the settings on your DHCP server. There's no reason why a lease should expire after 5 minutes and not get renewed.
 
everypot said:
To simplify the task, I wrote a simple shell script which basically repeats the above commands every 5 mins
[snip]
It works, but I feel it's kind of dumb. Unfortunately, I don't know any other solutions.
When you get a new lease, look (probably requires root) in /var/db/dhclient.leases.<interface> to see whether you get a very short DHCP lease or the connection is dropped for some other reason.

As for your script, have you tried setting the renew and/or rebind and/or expire options in /etc/dhclient.conf manually (see dhclient.conf(5))?

Fonz
 
A DHCP lease expiring shouldn't lose the connection, though. Just pinging the access point once every five minutes would be cheaper and might be enough, though still a hack.
 
wblock said:
A DHCP lease expiring shouldn't lose the connection, though.
Indeed. It's supposed to be renewed automagically. Which makes me suspect that there might be another reason why the connection gets dropped all the time.

Fonz
 
Back
Top