Skip to content

Commit 68be49d

Browse files
muhaidongjack0c
authored andcommitted
fix(wifi): fixed scan get ap number issue
1 parent 6868784 commit 68be49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/wifi/scan/main/scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ static void wifi_scan(void)
185185
#endif /*USE_CHANNEL_BTIMAP*/
186186

187187
ESP_LOGI(TAG, "Max AP number ap_info can hold = %u", number);
188-
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info));
189188
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&ap_count));
189+
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info));
190190
ESP_LOGI(TAG, "Total APs scanned = %u, actual AP number ap_info holds = %u", ap_count, number);
191191
for (int i = 0; i < number; i++) {
192192
ESP_LOGI(TAG, "SSID \t\t%s", ap_info[i].ssid);

0 commit comments

Comments
 (0)