wifi scan in non-blocking mode

ry1234
Posts: 9
Joined: Sun Dec 18, 2016 6:15 pm

wifi scan in non-blocking mode

Postby ry1234 » Sat Feb 04, 2017 3:42 am

Hi

I would like to use esp_wifi_scan_start() in non-blocking mode; is there an API or register that allows to check if the scan has completed?

Thanks!

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: wifi scan in non-blocking mode

Postby WiFive » Sat Feb 04, 2017 4:29 am


ry1234
Posts: 9
Joined: Sun Dec 18, 2016 6:15 pm

Re: wifi scan in non-blocking mode

Postby ry1234 » Wed Feb 08, 2017 4:03 pm

Thanks for that.

Does the wifi_scan_start() api initiate an active scan or a passive scan (or both)? I would like to limit to active scan only, couldn't find a way so far to control the behavior beyond a brief mention in the data sheet.

Thanks!

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: wifi scan in non-blocking mode

Postby kolban » Wed Feb 08, 2017 4:39 pm

Howdy ry1234,
Purely because I are a dummy ... can you explain the distinction between an "Active" WiFi scan and a "Passive" WiFi scan?

Neil
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ry1234
Posts: 9
Joined: Sun Dec 18, 2016 6:15 pm

Re: wifi scan in non-blocking mode

Postby ry1234 » Wed Feb 08, 2017 5:07 pm

Hi Neil,
Passive scanning is where the client listens to the beacon broadcasts (typical beacon interval is 100 msec).
Active scanning is where the client transmits a probe request and waits for a probe response from all SSIDs that received the request.

ry1234
Posts: 9
Joined: Sun Dec 18, 2016 6:15 pm

Re: wifi scan in non-blocking mode

Postby ry1234 » Wed Feb 08, 2017 5:09 pm

Hi,

Another piece of information: the esp_wifi_scan_start() API takes 200 msec to return, for a single Wifi channel:

wifi_scan_config_t cfg = {NULL, NULL, 1, false};
ESP_ERROR_CHECK( esp_wifi_scan_start(&cfg, true));

So I suspect it is performing a passive scan (?)

Who is online

Users browsing this forum: Google [Bot] and 126 guests