|
|
@@ -64,7 +64,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base,
|
|
|
case WIFI_EVENT_STA_DISCONNECTED:
|
|
|
ESP_LOGI(TAG, "WIFI_EVENT_STA_DISCONNECTED");
|
|
|
if (s_retry_num < MAX_RETRY_ATTEMPTS) {
|
|
|
- ESP_ERROR_CHECK(esp_wifi_connect());
|
|
|
+ esp_wifi_connect();
|
|
|
s_retry_num++;
|
|
|
} else if (ap_idx < s_ap_creds_num) {
|
|
|
/* Try the next AP credential if first one fails */
|
|
|
@@ -73,7 +73,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base,
|
|
|
ESP_LOGI(TAG, "Connecting to SSID: %s, Passphrase: %s",
|
|
|
wps_ap_creds[ap_idx].sta.ssid, wps_ap_creds[ap_idx].sta.password);
|
|
|
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wps_ap_creds[ap_idx++]) );
|
|
|
- ESP_ERROR_CHECK(esp_wifi_connect());
|
|
|
+ esp_wifi_connect();
|
|
|
}
|
|
|
s_retry_num = 0;
|
|
|
} else {
|
|
|
@@ -107,7 +107,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base,
|
|
|
* with legacy apps. So directly attempt connection here.
|
|
|
*/
|
|
|
ESP_ERROR_CHECK(esp_wifi_wps_disable());
|
|
|
- ESP_ERROR_CHECK(esp_wifi_connect());
|
|
|
+ esp_wifi_connect();
|
|
|
}
|
|
|
break;
|
|
|
case WIFI_EVENT_STA_WPS_ER_FAILED:
|