-->
Page 1 of 2

2.7.4 WiFi connection not as reliable as 2.4.2

PostPosted: Wed Sep 30, 2020 10:22 pm
by pidloop
Hello!

I have been using 2.4.2 for years and it has been flawless but I am now evaluating 2.7.2 because I would like to use LittleFS. I find 2.7.2 works very well except for one thing: wifi does not always connect.

My setup() loop to connect is just:

Code: Select allWiFi.mode(WIFI_STA);
WiFi.begin (ssid, pass);
while (WiFi.status() != WL_CONNECTED)
    delay(500);


I am finding about 5-10% of the time the loop exits but in fact the connection is not working, as evidenced by subsequent calls to WiFiClient::connect() returning false.

To test further, I added retry code when connect() fails exactly as above and it never succeeds. The only recourse is to reset the processor. Then the next time it might succeed and if so all is well forever.

So my question is: is there a new API best practice for connecting to wifi reliably in 2.7.4?

Many thanks for your time.

Re: 2.7.4 WiFi connection not as reliable as 2.4.2

PostPosted: Thu Oct 01, 2020 12:26 pm
by pidloop
Forgot to mention another symptom: 2.7.4 takes much longer to make the initial connection. 2.4.2 would reconnect to the same SSID/PW almost instantly after reset, but 2.7.4 takes anywhere from 4-10 seconds. This is entirely repeatable.

Re: 2.7.4 WiFi connection not as reliable as 2.4.2

PostPosted: Fri Oct 02, 2020 2:08 am
by schufti
for this kind of "message" it is more helpfull to "open an issue" over at github. it would take a long time to propagate from here to over there ...

Re: 2.7.4 WiFi connection not as reliable as 2.4.2

PostPosted: Fri Oct 02, 2020 12:17 pm
by JurajA
did you clear the flash to erase RF calibration data?