Wifi.begin question
Posted: Tue Oct 24, 2017 1:29 pm
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 ?
2/ my internet box is changing its bssid at every startup : will it cause issues when persistence is used ?
Thanks
Laurent
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