Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

WIFI reconnect #160

Closed
EtlamGit opened this issue Jan 8, 2023 · 1 comment
Closed

WIFI reconnect #160

EtlamGit opened this issue Jan 8, 2023 · 1 comment

Comments

@EtlamGit
Copy link
Contributor

EtlamGit commented Jan 8, 2023

How is reconnection handled in case WIFI connection is lost?

My use case is a location with bad WIFI signal. Therefore the connection could be lost at any time and the device should try to reconnect automatically (without blocking other tasks running on that device). I implemented something like that on a NodeMCU in LUA and that works like expected. But with a project based on this framework I experience the device just to be gone forever.

From other WIFI managers I know, that it is necessary to set some flag to enable automatic reconnect after connection loss. But here I do not find any method to do so:

WiFi.setAutoReconnect(true);
WiFi.persistent(true);

I also experienced that this setting is sometimes stored persistent in flash. So you might need to call this only once and afterwards every new program will automatically reconnect even when not calling these methods. This is the same as SSID and password, they are also stored. (But this might be only the case for LUA scripts.)

@EtlamGit
Copy link
Contributor Author

In my opinion it would be the task of WiFiManager to ensure automatic reconnect and not of the client application.
The pull request would change that accordingly.

When you think the client application should stay in charge of this task, we should at least mention that in the documentation.
(and reject this pull request)

@maakbaas maakbaas closed this as completed Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants