[GH-ISSUE #1450] Abandon Auto Reconnect #1240

Closed
opened 2026-02-28 01:29:11 +03:00 by kerem · 7 comments
Owner

Originally created by @DrJaymz on GitHub (Jul 8, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1450

In my application I want the portal to appear until it times out, if the Wi-Fi credential are saved but its unable to reconnect then I want to continue in an offline mode.

The problem is, I can't seem to see how to stop it trying to reconnect forever. It used to work fine, but I have opened a 3 year old project and functionality seems to have moved on somewhat - which is great.

I tried disconnect etc.

Still keep getting

no network found, reconnect after 1s
reconnect
scandone

which appears to be from the manager.

Originally created by @DrJaymz on GitHub (Jul 8, 2022). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1450 In my application I want the portal to appear until it times out, if the Wi-Fi credential are saved but its unable to reconnect then I want to continue in an offline mode. The problem is, I can't seem to see how to stop it trying to reconnect forever. It used to work fine, but I have opened a 3 year old project and functionality seems to have moved on somewhat - which is great. I tried disconnect etc. Still keep getting ``` no network found, reconnect after 1s reconnect scandone ``` which appears to be from the manager.
kerem closed this issue 2026-02-28 01:29:11 +03:00
Author
Owner

@tablatronix commented on GitHub (Jul 8, 2022):

well in wm use setConfigPortalTimeout

<!-- gh-comment-id:1179041042 --> @tablatronix commented on GitHub (Jul 8, 2022): well in wm use setConfigPortalTimeout
Author
Owner

@tablatronix commented on GitHub (Jul 8, 2022):

That is the esp library not wm, disable esp autoreconnect

<!-- gh-comment-id:1179041842 --> @tablatronix commented on GitHub (Jul 8, 2022): That is the esp library not wm, disable esp autoreconnect
Author
Owner

@DrJaymz commented on GitHub (Jul 8, 2022):

The timeout is set. It does timeout. And my mainloop begins, but it keeps trying to reconnect continually according to the debug output.

<!-- gh-comment-id:1179044448 --> @DrJaymz commented on GitHub (Jul 8, 2022): The timeout is set. It does timeout. And my mainloop begins, but it keeps trying to reconnect continually according to the debug output.
Author
Owner

@tablatronix commented on GitHub (Jul 8, 2022):

Yeah that an ESP thing, ESP.setAutoReconnect(false) or just setMode(WIFI_OFF)

<!-- gh-comment-id:1179060520 --> @tablatronix commented on GitHub (Jul 8, 2022): Yeah that an ESP thing, ESP.setAutoReconnect(false) or just setMode(WIFI_OFF)
Author
Owner

@DrJaymz commented on GitHub (Jul 8, 2022):

Yeah that an ESP thing, ESP.setAutoReconnect(false) or just setMode(WIFI_OFF)

its an 8266 does have either of those methods, however it does have WiFi.mode(WIFI_OFF);
so trying that.

Thanks for the help, I couldn't see where those messages are coming from, I searched my code and he WIFI manager code but couldn't get it to stop. The reason it matters is because its a sensor that will normally be on WIFI but if it can't connect then I want the output on serial port - and obviously random messages I don't need!

<!-- gh-comment-id:1179076973 --> @DrJaymz commented on GitHub (Jul 8, 2022): > Yeah that an ESP thing, ESP.setAutoReconnect(false) or just setMode(WIFI_OFF) its an 8266 does have either of those methods, however it does have WiFi.mode(WIFI_OFF); so trying that. Thanks for the help, I couldn't see where those messages are coming from, I searched my code and he WIFI manager code but couldn't get it to stop. The reason it matters is because its a sensor that will normally be on WIFI but if it can't connect then I want the output on serial port - and obviously random messages I don't need!
Author
Owner

@DrJaymz commented on GitHub (Jul 8, 2022):

Yes, I think that has got it - working nicely now.

<!-- gh-comment-id:1179079088 --> @DrJaymz commented on GitHub (Jul 8, 2022): Yes, I think that has got it - working nicely now.
Author
Owner

@tablatronix commented on GitHub (Jul 8, 2022):

Those messages are coming from esp debuggingm you have debugging enabled

there is a set auto reconnect, I do not have the exact method name

<!-- gh-comment-id:1179129334 --> @tablatronix commented on GitHub (Jul 8, 2022): Those messages are coming from esp debuggingm you have debugging enabled there is a set auto reconnect, I do not have the exact method name
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#1240
No description provided.