-->
Page 1 of 1

Wifi.begin question

PostPosted: Tue Oct 24, 2017 1:29 pm
by destroyedlolo
Hi all,

I'm new with ESP but I'm confused with WiFi.begin() after reading several articles (sometime saying the reverse of others). I'm using Arduino's IDE and didn't changed WiFi.persistent() or autoconnect.

So, some questions :
1/ if I use the same SSID and password, is the flash written or not at each call WiFi.begin() ?

It is worth to have a code like this one ?
Code: Select all   for( int i=0; i< 120; i++ ){   // Trying with autoconnect
      if(WiFi.status() == WL_CONNECTED)
         break;
      delay(500);
      Serial.print("-");
   }

   if(WiFi.status() != WL_CONNECTED){   // failed, back to manual connection
      WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
      while(WiFi.status() != WL_CONNECTED){
         delay(500);
         Serial.print(".");
      }
   }


2/ my internet box is changing its bssid at every startup : will it cause issues when persistence is used ?

Thanks

Laurent

Re: Wifi.begin question

PostPosted: Tue Oct 24, 2017 8:39 pm
by rudy
Documentation for WiFi.persistent() is misleading #3641 https://github.com/esp8266/Arduino/issues/3641

Worth looking at.