wpa_supplicant with madwifi-ng Scan timeout (30 seconds to associate)
Mon Feb 20 07:58:14 PST 2006
On Mon, Feb 20, 2006 at 12:26:39AM -0600, Ricardo T. Muggli wrote:
> It takes 30 seconds to associate with the access point using
> wpa_supplicant with madwifi-ng. Most of this time appears to be waiting
> for the scan to timeout. Scanning seems to be fast using normal
> utilities such as iwlist. (I have including timing from iwlist below.
> The wireless connection does work after waiting the 30 seconds for the
Scanning with dual-band cards and madwifi takes a long time, but not
> Summary of versions:
> - Linux: 188.8.131.52
> - wpa_supplicant: latest CVS
> - madwifi-ng: svnversion 1452
I'm actually running more or identical version at the moment (though,
svn 1453; not that I would expect that cause differences) and I did not
notice this kind of issue.
> Here is a snippet of the full wpa_supplicant output that shows the 30
> second delay (I added the blank line to show where the delay is):
> 1140414357.823834: State: DISCONNECTED -> SCANNING
> 1140414357.823858: Starting AP scan (broadcast SSID)
> 1140414357.823908: Wireless event: cmd=0x8b1a len=8
I don't really like that part of madwifi scan command in wpa_supplicant.
It is setting SSID here with SIOCSIWESSID when doing scanning.. Anyway,
I don't think that this would be an issue.
> 1140414387.825829: Scan timeout - try to get results
> 1140414387.825963: Received 333 bytes of scan results (1 BSSes)
> 1140414387.825978: Scan results: 1
Hmm.. wpa_supplicant did not receive SIOCGIWSCAN event from the driver
and had to rely on timeout. This did not happen for me in the first run
(i.e., when wpa_supplicant was setting interface up and doing the
I was able to reproduce this with 'iwlist ath0 scan' when wpa_supplicant
was running. The driver seemed to just return the current scan results
and not really do a new scan (which explains the insanely fast scan you
reported with iwlist). This looks like a driver issue to me. If a user
space program request a new scan with SIOCSIWSCAN, there better be a
SIOCGIWSCAN event coming at some point soon or something will time out
in this way.. I would guess this has something to do with background
scanning and changes related to it in madwifi.
Jouni Malinen PGP id EFC895FA
More information about the Hostap