Open GarMingLi opened 3 years ago
How to solve this problem? I tried 'ESP_ERROR_CHECK()'function cancels and judges the return value. If it fails, disconnect the WiFi connection and scan again. But the experience is not very good.
Hi, I suggest to check also the code returned by esp_wifi_scan_stop(). On another hand, if I remember correctly, you have to make sure the release of any resource allocated by the previous esp_wifi_scan_start(...) call. To release those resources is required a final call to esp_wifi_scan_get_ap_records(...) (esp_wifi_scan_stop does not perform that).
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html
Environment
Problem Description
Wifi mode runs in AP/STA mode.Wifi scans are performed every 3 minutes.However, the following errors often occur that cause a restart:
Code for wifi scanning: