You can chat about native SDK questions and issues here.

User avatar
By jonsrob
#89048 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:
https://19216801.win/ https://routerlogin.cloud/ https://192168101.red/

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.
Last edited by jonsrob on Thu Oct 08, 2020 2:47 am, edited 1 time in total.