Wireless from the Debian command line

Giles Orr gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon May 10 14:36:46 UTC 2010


Following on to my post about a new USB wireless-N adapter ...

I've previously connected to the WPA-enabled wireless router in my
house with a script like this:

   ifconfig wlan0 up
   wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -D wext &
   iwconfig wlan0 essid mock
   dhclient3 wlan0

/etc/wpa_supplicant.conf looks like this:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

network={
  scan_ssid=1
  psk="xxx xxxx"
  ssid="mock"
  priority=9
}

Until recently, this has worked fine.  I believe some default
configuration has changed recently in Debian squeeze, because now -
across three laptops (two squeeze, one Ubuntu 10.04) with a variety of
hardware (not just the wireless-N stick), I get continuous errors
similar to this:

Trying to associate with NN:NN:NN:NN:NN:NN (SSID='mock' freq=2442 MHz)
Associated with NN:NN:NN:NN:NN:NN
Authentication with NN:NN:NN:NN:NN:NN timed out.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Trying to associate with NN:NN:NN:NN:NN:NN (SSID='mock' freq=2442 MHz)
Associated with NN:NN:NN:NN:NN:NN
Authentication with NN:NN:NN:NN:NN:NN timed out.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<repeat ad infinitum, ~5 second intervals>

(I admit that the above box has yet to achieve working wireless ...
but the other two have and are now problematic.)

The Ubuntu Lucid Lynx box works beautifully with
wireless-g/GNOME/NetworkManager , but when I try this script and
configuration under Ubuntu, I get

Trying to associate with NN:NN:NN:NN:NN:NN (SSID='mock' freq=2442 MHz)
Association request to the driver failed
Associated with NN:NN:NN:NN:NN:NN
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<repeat ad infinitum>

It's different, but similar.  And perhaps the solution isn't the same,
but the similarity is quite interesting.  I've googled like mad, but
haven't found a good guide to command line wireless (well, several
that recreate the script and config I already have that's failing).
And believe me, a couple of the machines I'm using are NOT going to
run well (or possibly at all) with GNOME, so that solution is out.
"wicd" doesn't seem to be a solution either (it fails to connect).

Unencrypted wireless seems to be fine, I believe this is entirely
wpa_supplicant-related.

As always, assistance is much appreciated.

-- 
Giles
http://www.gilesorr.com/
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list