esp8266-react icon indicating copy to clipboard operation
esp8266-react copied to clipboard

Help me understand why "We want the device to come up in opmode=0 (WIFI_OFF)" (WiFiSettingsService.cpp)

Open JimThatcher opened this issue 3 years ago • 0 comments

What is the benefit of bringing the device up with the WiFi mode set to WIFI_OFF in the constructor of WiFiSettingsService? I understand that before the device has been configured we want it to come up in AP mode, but I don't understand why we wouldn't want it to go into STA mode and attempt to connect to the last known WiFi network the rest of the time. Is this necessary to get the WiFi configuration under the control of the StatefulService, or to restore the settings from the filesystem?

I'm also unclear on the purpose of setting the WiFi mode to WIFI_MODE_MAX, which has no defined meaning, then immediately back to WIFI_OFF (through equivalent enum WIFI_MODE_NULL).

JimThatcher avatar Jun 08 '22 07:06 JimThatcher