Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved: Esp core 2.4.0 not reconnecting by itself automatically to WiFi #532

Closed
jplavoiemtl opened this issue Feb 19, 2018 · 15 comments
Closed

Comments

@jplavoiemtl
Copy link

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
@tablatronix
Copy link
Collaborator

try

WiFi.setAutoReconnect(true);

@jplavoiemtl
Copy link
Author

jplavoiemtl commented 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?

@tablatronix
Copy link
Collaborator

But it connects on reboot?

@tablatronix
Copy link
Collaborator

Did you try development branch yet?

@jplavoiemtl
Copy link
Author

jplavoiemtl commented 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... :-(

@tablatronix
Copy link
Collaborator

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

@jplavoiemtl
Copy link
Author

jplavoiemtl commented 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.

@tablatronix
Copy link
Collaborator

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

@jplavoiemtl
Copy link
Author

jplavoiemtl commented 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.

@tablatronix
Copy link
Collaborator

tablatronix commented 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

@jplavoiemtl
Copy link
Author

jplavoiemtl commented 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.

@tablatronix
Copy link
Collaborator

Yes, see if one exists already though

@jplavoiemtl jplavoiemtl changed the title Esp module not reconnecting by itself automatically to wifi with WiFiManager Solved: Esp module not reconnecting by itself automatically to wifi Feb 20, 2018
@jplavoiemtl jplavoiemtl changed the title Solved: Esp module not reconnecting by itself automatically to wifi Solved: Esp core 2.4.0 not reconnecting by itself automatically to WiFi Feb 20, 2018
@jplavoiemtl
Copy link
Author

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

@tablatronix
Copy link
Collaborator

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

@jplavoiemtl
Copy link
Author

jplavoiemtl commented Feb 21, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants