Not doing a scan before associating with an Access Point
Fri Jun 24 09:23:40 PDT 2011
Please see my reply below.
> On Thu, Jun 23, 2011 at 11:14:09PM +0100, Panagiotis Georgopoulos wrote:
> > I am trying to reduce the time it takes to associate to an
> > Access Point. I realized that with the default wpa_supplicant settings (i.e.
> > ap_scan=1) there is a scan that the interface does with probe requests to
> > all channels before the association. This is essentially a 800-1000 ms delay
> > which I would like to remove completely.
> It would probably be easier to just limit the number of channels that
> get scanned rather than try to remove the scan completely. You will need
> to see the AP (Beacon or Probe Response frame) before being able to
> associate and running a scan on a single channel is pretty fast
> operation compared to full scan. You can do this by adding
> scan_freq=<freq in MHz> into the network block while still continuing to
> use ap_scan=1.
The problem is that I already have scan_freq=2417 in my configuration script but I still
see a full scan....
> > I've tried setting ap_scan=2 and the frequency of the access
> > point I want wpa_supplicant to associate to, and indeed there is no scanning
> > (I've checked it with a monitoring interface) but also no association! I
> > also tried ap_scan=0, but unfortunately with the same results.
> Which driver and driver wrapper are you using? ap_scan=2 is not
> supported by all drivers and anyway, the driver will do a scan anyway
> before association (and this may be a full scan), so ap_scan=1 with a
> single scan_freq configured can end up being much faster.
Right.... Your question about the driver and the wrapper got me thinking. I am using ath5k
as a driver but was running wpa_supplicant without setting the driver. So if, I then
realized that the default wrapper was wext and this seemed to causing the failure in doing
a scan only to the scan_freq=2417.
I got the latest wpa_supplicant from git, compiled it and run it with -Dnl80211 and now I
get much faster associations without a full scan!
Thanks a lot,
More information about the Hostap