-
-
Notifications
You must be signed in to change notification settings - Fork 748
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
ESP32: Wifi connects successfully only every second time #1168
Comments
Looks like need to add: espressif/arduino-esp32@fcbb3e7
So add the auth expire to the switch block to reconnect.. |
@chevdor http://www.espruino.com/Reference#l_Wifi_disconnected
this should be output: jsWarn( "wifiReasonToString: Unknown reasonL %d", reason); Looking here - would expect the reason number to be 2: In the js callback, you could reconnect rather than rebooting... If you do this and confirm the error code, then we know if the fix would work |
Please paste your code so we have a test case for this. Thanks. |
@wilberforce I am using ES6 and Thingssdk which does not make things simpler. I have even tried running again the code from a few days ago and again, I no longer see the issue.
If you have a lead, we could keep the ticket open, otherwise, since I don´t have better, I can propose to close it until the issue shows up again. |
@chevdor Do you know about |
Hello @wilberforce Here is the test code I use (just provide SSID and SECRET):
As you see, I have included an event handler in case of a disconnect. Here is what happen:
In the case when the connection does not succeed, there is no disconnect event so nothing additional I can report, just nothing happen. Can you please re-open this issue? |
The esp-idf has been updated to 2.1 - there was something in here about joining access points. Please re-check now |
I tested today with the cuttingEdge 2017-08-24 and I consider the issue fixed now. I tested with > x20 resets and got the ESP32 connected properly 19 times. |
See related espressif/arduino-esp32#234
I do have a very simple piece of code to connect to a Wifi network.
The Wifi network is fine and I connect to it 100% of the time successfully with various devices incl. and ESP8266.
With the ESP32 this is another story though. It fails/works always, every second (hard) restart.
If I do an
ESP32.reboot()
however, it connects 100% of the time.I tried various workaround, none being really good.
So far the best workaround I have considers that my project needs Wifi 100% of the time and simply do a soft reset when the Wifi is seen as disconnected (which seems to happen and the connection fails):
A real fix would be much better, no doubt :)
The text was updated successfully, but these errors were encountered: