[GH-ISSUE #532] Solved: Esp core 2.4.0 not reconnecting by itself automatically to WiFi #447

Closed
opened 2026-02-28 01:25:20 +03:00 by kerem · 15 comments
Owner

Originally created by @jplavoiemtl on GitHub (Feb 19, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/532

Basic Infos

Hardware

WiFimanager Branch/Release: Development

Hardware: ESP-12e

Core Version:

Description

Strange, the esp does not reconnect automatically to WiFi. When my esp is running it connect to WiFi no problem. I have a WiFi status of 3 which is connected. Serial.println(WiFi.status());

Then I deactivate WiFi in my router to simulate a WiFi problem. After I reactivate WiFi on the router, the esp does not reconnect to WiFi. I check status at 1 second intervals and I get 6 for a WL_DISCONNECTED.

I don't understand why the module does not reconnect automatically like is should. Any help please, thanks.

Settings in IDE

Module: NodeMcu,

Additional libraries:

Sketch


#include <Arduino.h>

void setup() {

}

void loop() {

}

Debug Messages

messages here
Originally created by @jplavoiemtl on GitHub (Feb 19, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/532 ### Basic Infos #### Hardware WiFimanager Branch/Release: Development Hardware: ESP-12e Core Version: ### Description Strange, the esp does not reconnect automatically to WiFi. When my esp is running it connect to WiFi no problem. I have a WiFi status of 3 which is connected. Serial.println(WiFi.status()); Then I deactivate WiFi in my router to simulate a WiFi problem. After I reactivate WiFi on the router, the esp does not reconnect to WiFi. I check status at 1 second intervals and I get 6 for a WL_DISCONNECTED. I don't understand why the module does not reconnect automatically like is should. Any help please, thanks. ### Settings in IDE Module: NodeMcu, Additional libraries: ### Sketch ```cpp #include <Arduino.h> void setup() { } void loop() { } ``` ### Debug Messages ``` messages here ```
kerem closed this issue 2026-02-28 01:25:20 +03:00
Author
Owner

@tablatronix commented on GitHub (Feb 19, 2018):

try

WiFi.setAutoReconnect(true);

<!-- gh-comment-id:366783596 --> @tablatronix commented on GitHub (Feb 19, 2018): try `WiFi.setAutoReconnect(true);`
Author
Owner

@jplavoiemtl commented on GitHub (Feb 19, 2018):

Thanks, I just tried and added in my setup loop:

WiFi.setAutoReconnect(true);

Still no re-connection to WiFi and same WL_DISCONNECTED 6 value looping around in my serial monitor window... Doesn't WiFiManager reconnects to WiFi automatically? What can be done in case of WiFi interruptions?

<!-- gh-comment-id:366786176 --> @jplavoiemtl commented on GitHub (Feb 19, 2018): Thanks, I just tried and added in my setup loop: WiFi.setAutoReconnect(true); Still no re-connection to WiFi and same WL_DISCONNECTED 6 value looping around in my serial monitor window... Doesn't WiFiManager reconnects to WiFi automatically? What can be done in case of WiFi interruptions?
Author
Owner

@tablatronix commented on GitHub (Feb 19, 2018):

But it connects on reboot?

<!-- gh-comment-id:366813958 --> @tablatronix commented on GitHub (Feb 19, 2018): But it connects on reboot?
Author
Owner

@tablatronix commented on GitHub (Feb 19, 2018):

Did you try development branch yet?

<!-- gh-comment-id:366814008 --> @tablatronix commented on GitHub (Feb 19, 2018): Did you try development branch yet?
Author
Owner

@jplavoiemtl commented on GitHub (Feb 19, 2018):

Yes, it connects fine on reboot. Only not reconnecting after I cut WiFi on the router then re-enabling WiFi on the router.
I tried the development branch today and I also tried the Master branch that I downloaded today. Same results, no automatic WiFi re-connection... :-(

<!-- gh-comment-id:366814785 --> @jplavoiemtl commented on GitHub (Feb 19, 2018): Yes, it connects fine on reboot. Only not reconnecting after I cut WiFi on the router then re-enabling WiFi on the router. I tried the development branch today and I also tried the Master branch that I downloaded today. Same results, no automatic WiFi re-connection... :-(
Author
Owner

@tablatronix commented on GitHub (Feb 19, 2018):

What version of esp core are you using might be a bug

<!-- gh-comment-id:366818193 --> @tablatronix commented on GitHub (Feb 19, 2018): What version of esp core are you using might be a bug
Author
Owner

@jplavoiemtl commented on GitHub (Feb 19, 2018):

Good point. In my Arduinio IDE librairies I see ESP8266 Built-in version 1.0.0 installed. I suppose I should get the new one at https://github.com/esp8266/Arduino and install the latest right? I'll do that tonight and install the latest 2.2.0. I will test and report after. We may be on a good track here, thanks.

I thought Arduino IDE 1.8.5 was updating all that stuff on it's own. A bit surprised I don't seem to have the latest esp core. I'll test soon.

<!-- gh-comment-id:366822062 --> @jplavoiemtl commented on GitHub (Feb 19, 2018): Good point. In my Arduinio IDE librairies I see ESP8266 Built-in version 1.0.0 installed. I suppose I should get the new one at https://github.com/esp8266/Arduino and install the latest right? I'll do that tonight and install the latest 2.2.0. I will test and report after. We may be on a good track here, thanks. I thought Arduino IDE 1.8.5 was updating all that stuff on it's own. A bit surprised I don't seem to have the latest esp core. I'll test soon.
Author
Owner

@tablatronix commented on GitHub (Feb 19, 2018):

2.4.0 your not even running the latest sdk on that version.

<!-- gh-comment-id:366824785 --> @tablatronix commented on GitHub (Feb 19, 2018): 2.4.0 your not even running the latest sdk on that version.
Author
Owner

@jplavoiemtl commented on GitHub (Feb 20, 2018):

A new test running with latest 2.4.0 esp8266 core. Same results, no WiFi re-connection after interruption.

I'm confused with this problem. This is a very basic setup: WiFi manager connects initially after power-up. The unit runs fine. Then after a simple WiFi interruption there is no re-connection!? Something is wrong and I can't get to the bottom of this.

<!-- gh-comment-id:366837227 --> @jplavoiemtl commented on GitHub (Feb 20, 2018): A new test running with latest 2.4.0 esp8266 core. Same results, no WiFi re-connection after interruption. I'm confused with this problem. This is a very basic setup: WiFi manager connects initially after power-up. The unit runs fine. Then after a simple WiFi interruption there is no re-connection!? Something is wrong and I can't get to the bottom of this.
Author
Owner

@tablatronix commented on GitHub (Feb 20, 2018):

No idea that functionality is controlled by esp code, maybe remove wifimanager and just see what happens with a begin in setup then unplug oh and turn on esp debugging

<!-- gh-comment-id:366839269 --> @tablatronix commented on GitHub (Feb 20, 2018): No idea that functionality is controlled by esp code, maybe remove wifimanager and just see what happens with a begin in setup then unplug oh and turn on esp debugging
Author
Owner

@jplavoiemtl commented on GitHub (Feb 20, 2018):

I found the problem, it is a bug in esp core 2.4.0! I did revert back to esp core 2.3.0 and the WiFi reconnects fine and WiFiManager works like a charm. I built this module last year with core 2.3.0 and the WiFi got screwed with the latest 2.4.0 core. So I guess you could close my issue here.

Do you recommend opening a bug report issue on the esp8266 core github or someone will eventually find and correct it? It's a really important issue basic WiFi re-connection and I wonder how come it didn't surface in the reports on the new 2.4.0 core.

<!-- gh-comment-id:366861277 --> @jplavoiemtl commented on GitHub (Feb 20, 2018): I found the problem, it is a bug in esp core 2.4.0! I did revert back to esp core 2.3.0 and the WiFi reconnects fine and WiFiManager works like a charm. I built this module last year with core 2.3.0 and the WiFi got screwed with the latest 2.4.0 core. So I guess you could close my issue here. Do you recommend opening a bug report issue on the esp8266 core github or someone will eventually find and correct it? It's a really important issue basic WiFi re-connection and I wonder how come it didn't surface in the reports on the new 2.4.0 core.
Author
Owner

@tablatronix commented on GitHub (Feb 20, 2018):

Yes, see if one exists already though

<!-- gh-comment-id:366863516 --> @tablatronix commented on GitHub (Feb 20, 2018): Yes, see if one exists already though
Author
Owner

@jplavoiemtl commented on GitHub (Feb 20, 2018):

Thanks for your help in resolving the issue to this problem @tablatronix

<!-- gh-comment-id:366865345 --> @jplavoiemtl commented on GitHub (Feb 20, 2018): Thanks for your help in resolving the issue to this problem @tablatronix
Author
Owner

@tablatronix commented on GitHub (Feb 21, 2018):

be sure to link to any bugs you find so we know

<!-- gh-comment-id:367170834 --> @tablatronix commented on GitHub (Feb 21, 2018): be sure to link to any bugs you find so we know
Author
Owner

@jplavoiemtl commented on GitHub (Feb 21, 2018):

There is this issue #4397 I opened on the esp8266 core group.

<!-- gh-comment-id:367179515 --> @jplavoiemtl commented on GitHub (Feb 21, 2018): There is this issue [#4397](https://github.com/esp8266/Arduino/issues/4397) I opened on the esp8266 core group.
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#447
No description provided.