- void wifi_factory_reset()
- {
- wifi_config_t blank_config;
- memset(&blank_config, 0, sizeof(blank_config));
- ESP_ERROR_CHECK(esp_wifi_disconnect());
- ESP_ERROR_CHECK(esp_wifi_stop());
- ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &blank_config));
- ESP_ERROR_CHECK(esp_wifi_start());
- }
WiFi factory reset - how to?
WiFi factory reset - how to?
Is the following code a reasonable way to factory reset the wifi credentials?
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: WiFi factory reset - how to?
Probably better to just stop WiFi and then nuke the WiFi NVS partition.
Who is online
Users browsing this forum: No registered users and 79 guests