View previous topic :: View next topic |
Author |
Message |
Tomsen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Feb 2005 Posts: 63 Location: Denmark
|
Posted: Mon Feb 05, 2007 8:29 am Post subject: auto reconnect on wireless |
|
|
Hi
I've just changed our wired network with wireless in the entire house. I have no problem with connecting to the AP, but because i have a cheepass router that has to restart everytime I change in the NAT settings.
This results in my server loosing the connection to the AP and i have to connect a screen and keyboard to restart the wireless interface.
How do i make it recoonect by itself? _________________ Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DavidJN n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 20 Jan 2005 Posts: 23
|
Posted: Mon Feb 05, 2007 1:17 pm Post subject: |
|
|
Might an easier solution be to use SSH to restart it? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tomsen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Feb 2005 Posts: 63 Location: Denmark
|
Posted: Tue Feb 06, 2007 9:24 am Post subject: |
|
|
I can't ssh to the machine, it has lost its network connection. That is why I have to connect a screen and keyboard _________________ Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ManReal n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 30 Jan 2007 Posts: 10
|
Posted: Tue Feb 06, 2007 2:12 pm Post subject: |
|
|
Can you not have a script running in the background on the server which pings google.com and if the ping fails then you reconnect the connection? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tomsen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Feb 2005 Posts: 63 Location: Denmark
|
Posted: Fri Feb 09, 2007 8:22 pm Post subject: |
|
|
Well I could, but isn't it possible to make gentoo reconnect if it looses the connection? _________________ Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
qdii Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Sep 2009 Posts: 106 Location: Madrid
|
Posted: Thu Dec 17, 2009 8:27 am Post subject: |
|
|
Sorry to reopen that thread, but it corresponds to a problem I am having.
To keep my 2nd computer connected to a Wifi network, I've crafted that little script :
Quote: |
#/bin/sh
if ping -q -c 1 www.google.com &> /dev/null
then
echo `date`: UP >/var/log/autoreconnect
else
ifconfig wlan0 down && sleep 5 && ifconfig wlan0 up
echo `date`: DOWN > /var/log/autoreconnect
fi
|
When I run it from a standard bash shell, it works fine.
bringing wlan0 down and up does - I imagine - reset it and DHCP finishes the work.
but when I schedule it to be executed every 3 minutes with vixie-cron, the connection remains down, even though /var/log/autoreconnect contains a line stating that it was DOWN a minute ago.
Any idea ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cach0rr0 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/14936637654ee19d6630f96.gif)
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Thu Dec 17, 2009 10:10 am Post subject: |
|
|
could you not just restart the net.wlan0 init script? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Yamakuzure Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/46484627558b6ccf846e49.jpg)
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Thu Dec 17, 2009 10:49 am Post subject: |
|
|
Maybe you could give net-misc/wicd a try? It allows for running custom scripts before/after shutting down/starting up a connection. And on my laptop if I re-enable wireless via rf-kill switch, connects in an instant. (Quite useful for a laptop that keeps travelling and switching between different wired and wireless networks.) _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Dec 17, 2009 12:59 pm Post subject: |
|
|
I use the auto-reconnect option inside WICD and it's working pretty good. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
qdii Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Sep 2009 Posts: 106 Location: Madrid
|
Posted: Fri Dec 18, 2009 12:35 am Post subject: |
|
|
cachorro : I've tried to use /etc/init.d/net.wlan0 restart, but it gets an error from something in /proc/.../carrier and won't reconnect the wifi until I stop and start the interface.
for what concerns WICD, I'll give it a try tomorrow thanks for the tip |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Dec 18, 2009 3:06 am Post subject: |
|
|
No problem, and if you need help, just post ![Razz :P](images/smiles/icon_razz.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|