You are not logged in.
Pages: 1
I have been using Arch for a few weeks now. I setup the wireless network in /etc/rc.conf, and it starts during boot. Just a few days ago, after the box being on for a few hours I had no network connection (ping didn't work, webpages couldn't load).
I didn't think much of it, but now it's happening more often. I really don't want to execute all the iwconfig commands that include my network name and key, so I just restart and it comes back up during reboot.
How can I prevent this, or if it does go down, what's the best way of bringing it back up?
Thanks for any help.
my rc.conf
wlan0="dhcp"
wlan_wlan0="wlan0 essid **** key **************************"
INTERFACES=(wlan0)
Last edited by m_ad (2009-10-03 15:46:36)
Offline
I suggest you install wicd, and make it autoconnect to your ap. since it's a daemon you don't even need to run X to have it connect, it connects upon startup.
Last edited by Lich (2009-10-01 15:45:45)
Archlinux | ratpoison + evilwm | urxvtc | tmux
Offline
I could try that. In my current setup, I don't need to run X to have my network connect. I have it configured in my rc.conf..
Offline
Does anyone else have any other suggestions, besides using wicd? Or is wicd the primary choice for connecting to wireless networks?
Offline
wicd is good. But if you want alternatives... I sometimes use this script:
#!/bin/bash
killall dhcpcd
ifconfig wlan0 down
ifconfig wlan0 up
iwconfig wlan0 essid my_net key s:my_pass
dhcpcd wlan0
Then you just chmod +x wireless.sh to make it executable, and ./wireless.sh to run it.
You can even improve it and put it in the background so that it also auto-reconnects for you when the link is dead.
I really don't want to execute all the iwconfig commands that include my network name and key, so I just restart and it
comes back up during reboot.
So you see, that's really unnecessary
This silver ladybug at line 28...
Offline
Does anyone else have any other suggestions, besides using wicd? Or is wicd the primary choice for connecting to wireless networks?
Maybe use netcfg2?
1. Install it (if not already)
2. Copy a wireless example from /etc/network.d/examples to /etc/network.d
3. Edit the file you just copied to match your network.. (set the timeout value to 50..)
4. Add network-profiles to your daemons array..
Last edited by brenix (2009-10-02 16:43:48)
Offline
Thanks to everyone for their input. I'll give these things a try
Thanks for the script, lolilolicon. How could I put it in the background?
Offline
#!/bin/bash
reconnect ()
{
killall dhcpcd
ifconfig wlan0 down
ifconfig wlan0 up
iwconfig wlan0 essid my_net key s:my_pass
dhcpcd wlan0
}
while sleep 1m ; do
timeout 10s ping -c 3 www.google.com &>/dev/null ||
reconnect #You may want to redirect the output to some log file.
done
To run this in the background, just put a & after the command, like this:
./wireless.sh &
You may want to put this in your ~/.xinitrc or /etc/rc.local or somewhere... or just type the command by hand.
Edit: Oh, I forgot... You have to be root to run the reconnect function... so make sure you run it as root
Last edited by lolilolicon (2009-10-02 17:33:08)
This silver ladybug at line 28...
Offline
Great! Thanks a lot loliloicon. The reason I would rather use the above method(s) is because I don't want to install many apps on this system.
Thanks again!
Offline
Pages: 1