Hieromon / AutoConnect

An Arduino library for ESP8266/ESP32 WLAN configuration at runtime with the Web interface

Home Page:https://hieromon.github.io/AutoConnect/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

esp32: frozen loop() and kicked out of the WiFi connection at Configure new AP

Evgen2 opened this issue · comments

commented

This is very similar to #593
Again I take example HelloWorld\HelloWorld.ino on Platformio with platformio.ini, go to "Configure new AP" menu item and kicked out of the WiFi connection as you can see at short video

Moreover, it looks like total frozen, so that no debug output from loop() I can see for about 20-30 seconds after kicked out, as well as no access point I can see on my smartfone for this frozen time period.

And this kicked out in "Configure new AP" is not stable and can happen on second or tenth time.

I can find that this issue happen after String AutoConnectCore::_token_LIST_SSID(PageArgument& args) function return

But there is one good news: if add one more true parameter to WiFi.scanNetworks call, than magically the problem with freezing and kicked out is solved

// _scanCount = WiFi.scanNetworks(false, true);
_scanCount = WiFi.scanNetworks(false, true, true);

scanNetworks defined as
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300, uint8_t channel = 0);