Not doing a scan before associating with an Access Point

Jouni Malinen j
Fri Jun 24 01:26:09 PDT 2011

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.

>                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.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list