wifi MODE setting in NVS?
Posted: Fri Jan 11, 2019 8:12 pm
I know the WiFi driver can save the STA and AP settings in NVS.
(I have it working with: esp_wifi_set_storage(WIFI_STORAGE_FLASH) ... esp_wifi_get_config(ESP_IF_WIFI_STA, &sta_stored_config) )
But can it also save the current mode too? (AP, STA, or AP+STA)
( I tried esp_wifi_get_mode(&old_mode) but it always returns AP+STA, regardless of the mode before rebooting)
So do I need to implement that myself?
(I have it working with: esp_wifi_set_storage(WIFI_STORAGE_FLASH) ... esp_wifi_get_config(ESP_IF_WIFI_STA, &sta_stored_config) )
But can it also save the current mode too? (AP, STA, or AP+STA)
( I tried esp_wifi_get_mode(&old_mode) but it always returns AP+STA, regardless of the mode before rebooting)
So do I need to implement that myself?