Chat freely about anything...

User avatar
By donnib
#39418
martinayotte wrote:It is in fact what ESP8266WiFiSTAClass::isConnected() does :

Code: Select allbool ESP8266WiFiSTAClass::isConnected() {
    return (status() == WL_CONNECTED);
}


Ok so that won't help me. I wonder what else i can do to solve this issue, any ideas ? I wish i could get rid of the ESP.reset().
User avatar
By donnib
#39520
martinayotte wrote:I maybe don't understand your issue, but why you don't use WiFi.reconnect() like mentioned earlier ?


I tried :

Code: Select allif( !WiFi.isConnected() ) {
    Serial.println( "Disconnected!" );
    WiFi.reconnect();
    WiFi.waitForConnectResult();
  }


instead of :

Code: Select allint i = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    ESP.wdtFeed();
    if(i>40)
      ESP.reset();
    i++;
    WiFi.begin(ssid, password);
    WiFi.config(ip,gateway,subnet);
    }


and i started to get very weird errors, i get wdt reset (seems like the underlaying code is not feeding the watchdog eventhough i have disabled the watchdog in my setup).