wifi_prov_scan_handlers is only used within ESP-IDF.
 
Symbols
loading...
Files
loading...
SummarySyntaxReferencesInstancesLifecycle

Fields

Field
Declared as
Description
esp_err_t (*)(bool blocking, bool passive, uint8_t group_channels, uint32_t period_ms, wifi_prov_scan_ctx_t **ctx)
Handler function called when scan start command is received with various scan parameters : blocking (input) - If true, the function should return only when the scanning is finished passive (input) - If true, scan is to be started in passive mode (this may be slower) instead of active mode group_channels (input) - This specifies whether to scan all channels in one go (when zero) or perform scanning of channels in groups, with 120ms delay between scanning of consecutive groups, and the value of this parameter sets the number of channels in each group. This is useful when transport mode is SoftAP, where scanning all channels in one go may not give the Wi-Fi driver enough time to send out beacons, and hence may cause disconnection with any connected stations. When scanning in groups, the manager will wait for atleast 120ms after completing scan on a group of channels, and thus allow the driver to send out the beacons. For example, given that the total number of Wi-Fi channels is 14, then setting group_channels to 4, will create 5 groups, with each group having 3 channels, except the last one which will have 14 % 3 = 2 channels. So, when scan is started, the first 3 channels will be scanned, followed by a 120ms delay, and then the next 3 channels, and so on, until all the 14 channels have been scanned. One may need to adjust this parameter as having only few channels in a group may slow down the overall scan time, while having too many may again cause disconnection. Usually a value of 4 should work for most cases. Note that for any other mode of transport, e.g. BLE, this can be safely set to 0, and hence achieve the fastest overall scanning time. period_ms (input) - Scan parameter specifying how long to wait on each channel (in milli-seconds).
esp_err_t (*)(bool *scan_finished, uint16_t *result_count, wifi_prov_scan_ctx_t **ctx)
Handler function called when scan status is requested. Status is given the parameters : scan_finished (output) - When scan has finished this returns true result_count (output) - This gives the total number of results obtained till now. If scan is yet happening this number will keep on updating.
esp_err_t (*)(uint16_t result_index, wifi_prov_scan_result_t *result, wifi_prov_scan_ctx_t **ctx)
Handler function called when scan result is requested. Parameters : scan_result - For fetching scan results. This can be called even if scan is still on going start_index (input) - Starting index from where to fetch the entries from the results list count (input) - Number of entries to fetch from the starting index entries (output) - List of entries returned. Each entry consists of ssid, channel and rssi information.
Context pointer to be passed to above handler functions upon invocation.