WPA - AP association Issue

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Oct 25 18:43:20 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Mr. Maloomnahi wrote:
> But the fact is after testing ap_scan in all modes the result is the 
> same. The association happens but for a small amount of time only and
> the reasons posted are also the same.

OK, we'll probably have to add some debug code to wpa_supplicant then,
although I'd like to double-check one thing first:  You are still using
wpa_supplicant 0.5.8, right?  And you got it from the w1.fi web site,
then compiled it from source?  Because if it's a distro package, then
you might want to uninstall it and try the source version (just in case
it works any differently).

If that's not it, then start by setting ap_scan back to 1 in the config
file.  Then unpack the source for wpa_supplicant 0.5.8, and bring up
events.c in an editor.  Look for the wpa_supplicant_event_scan_results
function; there's a while loop near the middle of it (it starts on line
523).  Right before the while statement, add the following lines:

wpa_printf(MSG_DEBUG, "AP count: %d", wpa_s->num_scan_results);
wpa_printf(MSG_DEBUG, "num_prio: %d", wpa_s->conf->num_prio);

Then compile the package, and try running it.  Now right before the "no
suitable AP found" message, you should get these two messages showing
the AP count and the value of num_prio.  If the AP count matches the
previous message ("scan results: X"), then that value is fine.  If the
num_prio value is greater than zero, then that value is also fine.

But if either of those values are different, then that value is where
your problem is; let me know and I'll come up with some deeper debugging
to hopefully figure those issues out.

Otherwise, I'll have to see if I can find anything else that looks like
it could be the issue (because right now I don't see anything).  It will
help (if I have to do that) to have about 20 lines before and after the
"no suitable AP found" message, from the debug dump from this run.  (And
also the config file, and command line.  But just of wpa_supplicant, not
hostapd.)

> If I use the firmware which has come along with the AR5212, it 
> associates fine after the specific settings of private variables 
> within. So what could be the issue with the WPA source code then?

What private variables, and what do you use to set them?  Is it a
program that comes with the firmware, or a standard Linux wireless
management tool?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHIRwHS5vET1Wea5wRA7FcAJoDjLXezAbY5mSYltUzG5h/EtJJfQCgq7Mv
uTecwsFYKvBuaASFy9E1XZU=
=1LP0
-----END PGP SIGNATURE-----



More information about the HostAP mailing list