diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index 52496bd..1e589cd 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -132,10 +132,7 @@ void WifiSetup(productConfig conf) { bssidConf = bssid; } - // WA https://github.com/esp8266/Arduino/issues/2186 - WiFi.persistent(false); - WiFi.mode(WIFI_OFF); // this is a temporary line, to be removed after SDK update to 1.5.4 - WiFi.mode(WIFI_STA); + SKETCH_DEBUG_PRINTF("Using channel %u (0==auto)\n", conf.channel ); WiFi.begin(conf.ssid, conf.password, conf.channel, bssidConf); while (WiFi.status() != WL_CONNECTED) { delay(50); @@ -144,7 +141,7 @@ void WifiSetup(productConfig conf) { reconfig = 0; return; } - if (connectionTry == 60) { + if (connectionTry == 120) { SKETCH_DEBUG_PRINTLN("Cannot connect to wifi. Try without BSSID and channel"); WiFi.begin(conf.ssid, conf.password); }