[GH-ISSUE #1032] After void setup fail connection to wifi, it don't try to connect again on loop #879

Closed
opened 2026-02-28 01:27:28 +03:00 by kerem · 1 comment
Owner

Originally created by @AlgoON-product on GitHub (Apr 7, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1032

Hi,
I'm using a Wemos D1 mini Pro, the library work well the only problem is that when the esp fail the initial connection to wifi (caused by the router off), if the router return online the esp dont't try again to connect to wifi.
In setup function to connect WiFi i use the function .autoConnect().
bye

Originally created by @AlgoON-product on GitHub (Apr 7, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1032 Hi, I'm using a Wemos D1 mini Pro, the library work well the only problem is that when the esp fail the initial connection to wifi (caused by the router off), if the router return online the esp dont't try again to connect to wifi. In setup function to connect WiFi i use the function .autoConnect(). bye
kerem 2026-02-28 01:27:28 +03:00
Author
Owner

@alfo commented on GitHub (May 21, 2020):

You should set a timeout so the D1 mini reboots if there's no signal and nobody logs into the config portal:

const unsigned long CONNECT_TIMEOUT = 30; // How long to attempt to connect to saved WiFi before going into AP mode
const unsigned long AP_TIMEOUT = 60; // Wait 20 Seconds in the config portal before trying again the original WiFi creds


wm.setConnectTimeout(CONNECT_TIMEOUT);
wm.setTimeout(AP_TIMEOUT);
<!-- gh-comment-id:632036104 --> @alfo commented on GitHub (May 21, 2020): You should set a timeout so the D1 mini reboots if there's no signal and nobody logs into the config portal: ``` const unsigned long CONNECT_TIMEOUT = 30; // How long to attempt to connect to saved WiFi before going into AP mode const unsigned long AP_TIMEOUT = 60; // Wait 20 Seconds in the config portal before trying again the original WiFi creds wm.setConnectTimeout(CONNECT_TIMEOUT); wm.setTimeout(AP_TIMEOUT); ```
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#879
No description provided.