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:
WiFi.begin (ssid, pass);
while (WiFi.status() != WL_CONNECTED)
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.