You are not logged in.

#1 2010-03-18 16:16:14

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Instructions: easy roaming wifi via the command line

First off, you don't need netcfg, wicd, or networkmanager for this. All you need is ifplugd, wpa_supplicant, and the Arch initscripts.

If you don't already have ifplugd and wpa_supplicant, install them.

# pacman -S ifplugd wpa_supplicant

Now put this in /etc/wpa_supplicant.conf (replace the file if it's already there):

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=network
eapol_version=1
update_config=1
fast_reauth=1
ap_scan=1
network={
    key_mgmt=NONE
}

and this in /etc/rc.local, replacing "wlan0" with the name of your wireless interface:

# Start wpa_supplicant on wireless interface
echo "Starting wpa_supplicant"
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf -B || echo " ... FAILED"

In /etc/ifplugd/ifplugd.conf, uncomment the section relating to wlan0, and if necessary rename it. Add wlan0 (or whatever) to the interfaces controlled by ifplugd.

Finally, in /etc/rc.conf, add your wireless interface (in my case wlan0) to the INTERFACES list:

wlan0="dhcp"
INTERFACES=(foo bar baz ... wlan0)

Add ifplugd to your daemons list and remove network (or wicd or networkmanager). And that's it, you're done. wpa_supplicant will auto-associate with the nearest open network, and when it does, ifplugd will run dhcpcd and connect you. To select another network you can use wpa_cli or wpa_gui, and ifplugd will connect you automatically. Simple, fast, and it works.

Offline

#2 2010-03-18 18:15:44

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Instructions: easy roaming wifi via the command line

This should go on the wiki, not the forums

Offline

Board footer

Powered by FluxBB