esp_wifi_scan_get_ap_record() function
Get one AP record from the scanned AP list. @attention Different from esp_wifi_scan_get_ap_records(), this API only gets one AP record from the scanned AP list each time. This API will free the memory of one AP record, if the user doesn't get all records in the scannned AP list, then needs to call esp_wifi_clear_ap_list() to free the remaining memory.
Arguments
ap_record
pointer to one AP record
Return value
- ESP_OK: succeed - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start - ESP_ERR_INVALID_ARG: invalid argument - ESP_FAIL: scan APs is NULL, means all AP records fetched or no AP found