ESP32: Wifi connects successfully only every second time #1168
See related espressif/arduino-esp32#234
I do have a very simple piece of code to connect to a Wifi network.
With the ESP32 this is another story though. It fails/works always, every second (hard) restart.
I tried various workaround, none being really good.
A real fix would be much better, no doubt :)
The text was updated successfully, but these errors were encountered:
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
@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.
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?
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.