esp-idf/examples/wifi/fast_scan
Jakob Hasse 1cf2312734 Examples: some examples use new event register API
* getting started - station
* softap
* iperf
* fast scan
* Power save
2020-03-25 10:36:47 +08:00
..
main Examples: some examples use new event register API 2020-03-25 10:36:47 +08:00
CMakeLists.txt esp_wifi: Additional code snippets in esp_wifi_scan_example 2019-10-23 14:12:32 +08:00
Makefile esp_wifi: Additional code snippets in esp_wifi_scan_example 2019-10-23 14:12:32 +08:00
README.md esp_wifi: Additional code snippets in esp_wifi_scan_example 2019-10-23 14:12:32 +08:00

Wifi Fast Scan Example

This example shows how to use the scan functionality of the Wi-Fi driver of ESP32 for connecting to an AP.

Two scan methods are supported: fast scan and all channel scan.

  • fast scan: in this mode, scan finishes right after a matching AP is detected, even if channels are not completely scanned. You can set thresholds for signal strength, as well as select desired authentication modes provided by the AP's. The Wi-Fi driver will ignore AP's that fail to meet mentioned criteria.

  • all channel scan: scan will end only after all channels are scanned; the Wi-Fi driver will store 4 of the fully matching AP's. Sort methods for AP's include rssi and authmode. After the scan, the Wi-Fi driver selects the AP that fits best based on the sort.

After the scan, the Wi-Fi driver will try to connect. Because it needs to to allocate precious dynamic memory to store matching AP's, and, most of the cases, connect to the AP with the strongest reception, it does not need to record all the AP's matched. The number of matches stored is limited to 4 in order to limit dynamic memory usage. Among the 4 matches, AP's are allowed to carry the same SSID name and all possible authentication modes - Open, WEP, WPA and WPA2.