[GH-ISSUE #182] int WiFiManager::connectWifi(String ssid, String pass) might not return #146

Closed
opened 2026-02-28 01:23:41 +03:00 by kerem · 0 comments
Owner

Originally created by @antonmeyer on GitHub (Jun 5, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/182

int connRes = WiFi.waitForConnectResult(); // might not return

this might hang in an endless loop

while(status() == WL_DISCONNECTED) {
    delay(100);

}

So it will never switch to the config mode.

Not sure, if this issue was reported already

To be fair: I´m not sure, what the ESP8266 does in the background and when it will report Connect_FAIL
In this case the visualmicro debug mode was the root cause. In general strange conncept from ESP8266 Wifi lib to loop a poll, if there would be a defined timeout of the connection attempt. (if so, ??)
A callback sounds for me more reliable.
-> great thank to the autor of WiFiManager,

Originally created by @antonmeyer on GitHub (Jun 5, 2016). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/182 int connRes = WiFi.waitForConnectResult(); // might not return this might hang in an endless loop ``` while(status() == WL_DISCONNECTED) { delay(100); ``` } So it will never switch to the config mode. Not sure, if this issue was reported already To be fair: I´m not sure, what the ESP8266 does in the background and when it will report Connect_FAIL In this case the visualmicro debug mode was the root cause. In general strange conncept from ESP8266 Wifi lib to loop a poll, if there would be a defined timeout of the connection attempt. (if so, ??) A callback sounds for me more reliable. -> great thank to the autor of WiFiManager,
kerem closed this issue 2026-02-28 01:23:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#146
No description provided.