force WiFi.mode

This commit is contained in:
Proddy
2024-01-01 16:59:36 +01:00
parent 400100759a
commit e64a374174

View File

@@ -17,12 +17,14 @@ void NetworkSettingsService::begin() {
// WiFi.mode(WIFI_OFF); // WiFi.mode(WIFI_OFF);
// } // }
WiFi.mode(WIFI_MODE_STA); // TODO added otherwise crashes. this is the default.
// WiFi.useStaticBuffers(true); // uses 40kb more heap and max alloc, so not recommended // WiFi.useStaticBuffers(true); // uses 40kb more heap and max alloc, so not recommended
WiFi.persistent(false); WiFi.persistent(false);
WiFi.setAutoReconnect(false); WiFi.setAutoReconnect(false);
WiFi.mode(WIFI_MODE_MAX); // WiFi.mode(WIFI_MODE_MAX); // TODO commented out, not sure what use it has
WiFi.mode(WIFI_MODE_NULL); // WiFi.mode(WIFI_MODE_NULL);
// WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN, connect issues in 2.0.14 // WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN, connect issues in 2.0.14
// WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set // WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set