WiFi Provisioning Manager bug
Posted: Thu Apr 27, 2023 1:36 pm
Hi,
I'm using the WiFi Provisioning Manager <wifi_provisioning/manager.h> using BLE and the esp prov app. The credentials are stored in nvs to be used for connecting to the same network later of course.
I have found the following regarding the credentials in nvs which might be a bug, but I'm not sure that I'm not doing anything wrong:
Some credentials already are in the nvs, but I want to start the provision manager to enable the user to connect to a different network if they so chooses. If the user doesn't enter any new credentials there is a timer that times out. I stop and deinit provisioning and I then want to try to connect to the network stored in the nvs BUT the credentials are now (temporarily) gone/unavailable until the device has been rebooted (meaning that they are indeed in flash).
The code I'm using to determining if there are credentials in nvs are taken from within the provisioning manager:
I can see that the manager moves credentials from flash to ram, could this be the reason they are not available after provisioning has been stopped (without providing new) - and is this desired behavior?
Thanks a lot,
Kasper Nyhus
I'm using the WiFi Provisioning Manager <wifi_provisioning/manager.h> using BLE and the esp prov app. The credentials are stored in nvs to be used for connecting to the same network later of course.
I have found the following regarding the credentials in nvs which might be a bug, but I'm not sure that I'm not doing anything wrong:
Some credentials already are in the nvs, but I want to start the provision manager to enable the user to connect to a different network if they so chooses. If the user doesn't enter any new credentials there is a timer that times out. I stop and deinit provisioning and I then want to try to connect to the network stored in the nvs BUT the credentials are now (temporarily) gone/unavailable until the device has been rebooted (meaning that they are indeed in flash).
The code I'm using to determining if there are credentials in nvs are taken from within the provisioning manager:
Code: Select all
/* Get Wi-Fi Station configuration */
wifi_config_t wifi_cfg;
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) {
return ESP_FAIL;
}
if (strlen((const char *) wifi_cfg.sta.ssid)) {
*provisioned = true;
debug_print_wifi_credentials(wifi_cfg.sta, "Found");
}
Thanks a lot,
Kasper Nyhus