You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WiFi.scanNetworks in SDK 2.2 never returns to the main app under certain conditions when in AP mode.
No WDT or stack dump is produced, the ESP simply never returns from the call, no data is sent over WiFi, and a reset is required to regain operation.
Hardware
Hardware: WeMos D1 mini
Core Version: Failing: GIT head ; passing: GIT (f9ac524).
Description
Discovered this while rebuilding my app PsychoPlug (https://github.com/earlephilhower/psychoplug) with latest GIT head. Sample code below reproduces the failure using the HTTPSServer example code + a bit of my own stuff that produced the web page.
ESP initializes and goes into AP mode and has a SSL (443) server to allow a cell phone or laptop to connect and set the configuration of the app. The setup.html page is generated and sent line-by-line using client.print()s to a WiFiClientSecure object.
Headers are sent, the HTML prefixes, and some intro form fields.
Then WiFi.scanNetworks() is called to generate a popup menu on the page to allow the user to select which AP to connect to in operational mode.
Under SDK 2.2, this call to wifi.scannetworks() never returns. Under the commit right before SDK2.2 it operates as expected.
Replacing the call in the sample script with
int cnt = 0; // int cnt = WiFi.scanNetworks();
also works properly.
Adding a Serial.printf before it makes it work, too:
Serial.printf("1234\n");
int cnt = WiFi.scanNetworks();
Putting in a yield() prior to the call, or changing to 80MHz operation, doesn't fix it and it still crashes.
Erasing the flash settings area (and the entire chip) has no effect.
To Reproduce
Run script, connect to "testap" (no password) and go to https://192.168.1.4/ . On 2.1 you'll get a header and a popup menu of detected APs, as well as serial output showing
....
new client
+SentSetupHTML (started the page xmission)
done
-SendSetupHTML (ended page xmission)
When it hangs the "-SendSetupHTML" line never comes and no WDT fires, the ESP just hangs forever.
Settings in IDE
Module: Wemos D1 Mini
Flash Size: 4MB
CPU Frequency: 160Mhz
LWIP: v2 (lo mem & hi BW show same behavior)
Basic Infos
WiFi.scanNetworks in SDK 2.2 never returns to the main app under certain conditions when in AP mode.
No WDT or stack dump is produced, the ESP simply never returns from the call, no data is sent over WiFi, and a reset is required to regain operation.
Hardware
Hardware: WeMos D1 mini
Core Version: Failing: GIT head ; passing: GIT (f9ac524).
Description
Discovered this while rebuilding my app PsychoPlug (https://github.com/earlephilhower/psychoplug) with latest GIT head. Sample code below reproduces the failure using the HTTPSServer example code + a bit of my own stuff that produced the web page.
ESP initializes and goes into AP mode and has a SSL (443) server to allow a cell phone or laptop to connect and set the configuration of the app. The setup.html page is generated and sent line-by-line using client.print()s to a WiFiClientSecure object.
Headers are sent, the HTML prefixes, and some intro form fields.
Then WiFi.scanNetworks() is called to generate a popup menu on the page to allow the user to select which AP to connect to in operational mode.
Under SDK 2.2, this call to wifi.scannetworks() never returns. Under the commit right before SDK2.2 it operates as expected.
Replacing the call in the sample script with
also works properly.
Adding a Serial.printf before it makes it work, too:
Putting in a yield() prior to the call, or changing to 80MHz operation, doesn't fix it and it still crashes.
Erasing the flash settings area (and the entire chip) has no effect.
To Reproduce
Run script, connect to "testap" (no password) and go to https://192.168.1.4/ . On 2.1 you'll get a header and a popup menu of detected APs, as well as serial output showing
When it hangs the "-SendSetupHTML" line never comes and no WDT fires, the ESP just hangs forever.
Settings in IDE
Module: Wemos D1 Mini
Flash Size: 4MB
CPU Frequency: 160Mhz
LWIP: v2 (lo mem & hi BW show same behavior)
Sketch
The text was updated successfully, but these errors were encountered: