I want to connect to two wifi networks with the difference of some interval of time.
for example: network1 for 10 min and network2 for 10 minutes.
but for changing the configuration I want to stop the wifi then set the configuration and then start the wifi.
that is in idf like->>>
Code: Select all
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config1) );
ESP_ERROR_CHECK( esp_wifi_start() );
esp_wifi_stop();
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config2) );
ESP_ERROR_CHECK( esp_wifi_start() );
esp_wifi_stop();
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config1) );
ESP_ERROR_CHECK( esp_wifi_start() );
Or there is any another solutions to work this way?