From 637fa8abccb93d25b42f27ddb331e053a66a4c54 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Sun, 28 Apr 2024 20:00:37 +0800 Subject: [PATCH] fix(wifi): fixed scan get ap number issue --- examples/wifi/scan/main/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index 02a7388366..03ff6cd44c 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -153,8 +153,8 @@ static void wifi_scan(void) ESP_ERROR_CHECK(esp_wifi_start()); esp_wifi_scan_start(NULL, true); ESP_LOGI(TAG, "Max AP number ap_info can hold = %u", number); - ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info)); ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&ap_count)); + ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info)); ESP_LOGI(TAG, "Total APs scanned = %u, actual AP number ap_info holds = %u", ap_count, number); for (int i = 0; i < number; i++) { ESP_LOGI(TAG, "SSID \t\t%s", ap_info[i].ssid);