[pkg-wpa-devel] Re: No WPA Association on boot with "working"
configuration
Kr0ntab
kr0ntab at yahoo.com
Sat Jun 3 05:41:40 UTC 2006
Well,
I don't think my first email has been published to the rest of the
group yet, but in case it ever is, here is an update regarding the
problem.
At this point it appears my problem was more of an actual
wpa_suppplicant issue, and not related to the debian wpasuplicant
package or ifupdown. After a full day of hammering away at this,
it's become apparent that even on continual ifupdown's, or manually
running wpa_supplicant, the wpa service does not always associate
(a.) fast enough to facilitate dhclient3's lease request, or (b.)
sometimes not even at all.
To combat the "delayed" associations, I bumped up my dhclient3
"timeout" value to 120 seconds, versus the default 30. Another
method would be to define/decrease the "retry" interval to less than
the default 5 minutes, or use a combination of the two. Manual
debugging of wpa_supplicant (-dd) shows that sometimes my cards first
attempt to associate fails due to a psk auth failure, but then
succeeds on it's next attempt. This was confirmed by both the debug
logs from both wpa_supplicant and my Cisco access point. Strange.
Depending on other nuances, sometimes wpa will cycle through for just
longer than 30 seconds before getting things straightened out. Other
times, wpa would simply not connect at all, and for some reason place
the AP's bssid into it's blacklist, (doh!). Manually restarting wpa,
obvisouly clears the blacklist, and things go back to normal, etc,
etc.
I ended up using mode 2 (README.modes) for my interface config. For
some reason, this gets me connected more consistantly than mode 1.
However, I'm going to continue trying mode 1, because (imho) I too
agree this to be the better direction for configuring wpa wireless.
Maybe we can get xsupplicant to do the same thing for our wired
interfaces, too. ;)
I won't post additional logs this particular issue is probably more
suited for the wpa_supplicant mailing list. But for the sake of
reference, here are my final configs:
/etc/network/interfaces:
------------------------
auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp
wpa-conf /etc/wpa_supplicant.conf.local
------------------------
/etc/dhcp3/dhclient.conf: (adjusted values)
------------------------
timeout 120;
retry 180;
------------------------
/etc/wpa_supplicant.conf.local:
------------------------
ap_scan=1
network={
ssid="SSID-WAS-HERE"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
scan_ssid=1
psk=SSID-HASH-WAS-HERE
}
------------------------
Many thanks for your attention.
--- Kr0ntab <kr0ntab at yahoo.com> wrote:
> Greets.
>
> Ok... perhaps a fresh set of eyes can help me out with this
> problem,
> as this issue not making a lot of sense to me. Two different
> laptops,
> same problem. (just my luck... it's probably somethin I'm missing)
>
> Any help would be greatly appreciated.
>
> Distro: Ubuntu 6.06
> Package: wpasupplicant 0.4.8-3ubuntu1
> kernel: ubuntu official build - 2.6.15-23.39 (686)
> Card 1: Intel 2200, ipw2200 driver v1.1.1
> Card 2: Atheros chipset (madwifi)
> AP: Cisco 1231AG
> Wireless: WPA-PSK, TKIP, Hidden SSID
>
> I'm going up against a lame issue with the new way of invoking
> wpa_supplicant via the ifupdown suite. A couple of my laptops are
> experiencing the same issue. wpa_supplicant will successfully
> auth/associate, and dhclient3 will obtain an IP when I manually
> issue
> an "ifup eth1" command. "sudo /etc/init.d/networking restart" even
> brings it up nicely. But for some reason... on system startup, it
> will not associate or pull an IP. The if-pre-up.d script
> "wpasupplicant", which is really just a sym link to
> /etc/wpa_supplicant/ifupdown.sh, obviously works, because again...
> manual restart of the networking scripts and ifup commands bring up
> wpa and dhcp.
>
> Upon boot, and first logon, iwconfig and ifconfig both show no
> association or dhcp lease. The following shows that wpa_supplicant
> was invoked and is running. (although I don't have debug output
> from
> the first connection attempt. A subsequent "ifdown -a" and "ifup
> -a"
> kills and initiates the same process, but brings up the interface
> fine.
>
> (forgive the wrapping)
> $ ps -ef | grep wpa
> root 3444 1 0 22:20 ? 00:00:00
> /sbin/wpa_supplicant
> -B -P /var/run/wpa_supplicant.eth1.pid -i eth1 -C
> /var/run/wpa_supplicant -D wext
>
>
> wpa_supplicant state says it's INACTIVE?
>
> # wpa_cli
> > level 0
> OK
> > status
> wpa_state=INACTIVE
>
>
> After manual "ifdown eth1" and "ifup eth1", a successful connection
> is made, IP is renewed. See wpa_cli output below.
>
> # wpa_cli
> ... snipped for brevity ...
>
> Connection to wpa_supplicant re-established
> <2>Trying to associate with 00:12:80:28:c2:50 (SSID='SSID-WAS-HERE'
> freq=0 MHz)
> <2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
> <2>Authentication with 00:00:00:00:00:00 timed out.
> <2>Trying to associate with 00:12:80:28:c2:50 (SSID='SSID-WAS-HERE'
> freq=0 MHz)
> <2>Associated with 00:12:80:28:c2:50
> <2>WPA: Key negotiation completed with 00:12:80:28:c2:50 [PTK=TKIP
> GTK=TKIP]
> <2>CTRL-EVENT-CONNECTED - Connection to 00:12:80:28:c2:50 completed
> (auth)
>
>
> My network and wpa settings:
>
> $ cat /etc/network/interfaces
> auto lo eth1
> iface lo inet loopback
>
> iface eth1 inet dhcp
> wpa-ssid SSID-WAS-HERE
> wpa-key-mgmt WPA-PSK
> wpa-psk AND-MA'-PSK-WAS-HERE :-)
> wpa-ap-scan 1
> wpa-proto WPA
> wpa-scan-ssid 1
> wpa-pairwise TKIP
> wpa-group TKIP
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Pkg-wpa-devel
mailing list