Valid HTML 4.01 Transitional
Prev: Xine-Based Multimedia Players Crash on Initialization Next: DNS Query Denied
(Index)
Jim Carter's Bugfixes

Wi-fi Won't Connect to New Network

James F. Carter
2007-09-27
Symptom:

My laptop is set up with wpa_supplicant and dhclient to handle dynamic network association. /etc/wpa_supplicant.conf includes network blocks for the four nets I use, and ap_scan=1 (wpa_supplicant initiates scan and picks the access point). I start it up on one of the nets. Later I migrate to another, e.g. work to home. But I have no connectivity; the interface is fixated on the previous net and won't switch over to the new one.

What's going on:

Duh, just because it's out of range of the previous net gives it no clue that it's in range of another one. Admittedly it should be a little smarter, but I'm just using the infrastructure; I didn't write the code.

How to fix:

Step 1: wpa_cli reassociate
This locates and associates with an access point on the new net, and loads the appropriate encryption key. /etc/wpa_supplicant.conf has a setting for ctrl_interface_group, and any user in that group can issue this command.

Step 2: You need to kick dhclient to make it obtain an IP address on the new network.

The security on dhclient is a bit worrisome: according to the default /etc/dhclient.conf it listens for OMAPI commands on port 7911 from any network interface, with no authentication key. (Authentication may be planned for a future version.) Your firewall should block out such connections except from localhost, in the likely case on a personal laptop that every user on the machine is authorized to affect dhclient.

Fly in ointment: sometimes but not always, wpa_supplicant gets into a loop in which it scans, seems to associate (packets can be sent), but fails to finish the association, and retries. I don't know whether this is a problem with wpa_supplicant or with the Intel ipw3945 wireless chip's driver or firmware -- I wouldn't be surprised if it were the latter.


Prev: Xine-Based Multimedia Players Crash on Initialization Next: DNS Query Denied
(Index)