Closed aqandu closed 5 years ago
Found out why and when.
In wifi_manager.c
, around line 715
, when it does the scan:
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, true));
if the WIFI_MANAGER_STA_DISCONNECT_BIT
bit is still high, meaning the NWP is still trying to connect to a station, then the scan fails (TIMEOUT). We must wait for the wifi callback to catch the bit and disconnect before scanning.
if the WiFi profile saved on the ESP cannot be connected to. I guess it tries and maybe keeps trying? And that's why the disconnect never happens.
Reference: https://www.esp32.com/viewtopic.php?t=7600
Fixed it. Changed the timeout (or something, I can't remember what I did... o_0)
When the board powers on sometimes it crashes while trying to scan for WiFi networks. I don't know when or why.