Explorar el Código

legacy provisioning: Always try to reconnect when disconnected

Some APs may fail authentication temporarily if they have too many
associated stations, for example.
Angus Gratton hace 5 años
padre
commit
200fa4abeb

+ 1 - 1
examples/provisioning/ble_prov/main/app_prov.c

@@ -248,8 +248,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas
             /* If none of the expected reasons,
              * retry connecting to host SSID */
             g_prov->wifi_state = WIFI_PROV_STA_CONNECTING;
-            esp_wifi_connect();
         }
+        esp_wifi_connect();
     }
 }
 

+ 1 - 1
examples/provisioning/console_prov/main/app_prov.c

@@ -186,8 +186,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas
             /* If none of the expected reasons,
              * retry connecting to host SSID */
             g_prov->wifi_state = WIFI_PROV_STA_CONNECTING;
-            esp_wifi_connect();
         }
+        esp_wifi_connect();
     }
 }
 

+ 1 - 1
examples/provisioning/custom_config/main/app_prov.c

@@ -211,8 +211,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas
             /* If none of the expected reasons,
              * retry connecting to host SSID */
             g_prov->wifi_state = WIFI_PROV_STA_CONNECTING;
-            esp_wifi_connect();
         }
+        esp_wifi_connect();
     }
 }
 

+ 1 - 1
examples/provisioning/softap_prov/main/app_prov.c

@@ -197,8 +197,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas
             /* If none of the expected reasons,
              * retry connecting to host SSID */
             g_prov->wifi_state = WIFI_PROV_STA_CONNECTING;
-            esp_wifi_connect();
         }
+        esp_wifi_connect();
     }
 }