diff options
Diffstat (limited to 'main')
| -rw-r--r-- | main/tollgate_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c index c0ff65f..ad5211a 100644 --- a/main/tollgate_main.c +++ b/main/tollgate_main.c | |||
| @@ -56,6 +56,7 @@ static void wifi_event_handler(void *arg, esp_event_base_t event_base, | |||
| 56 | tollgate_client_on_sta_disconnected(); | 56 | tollgate_client_on_sta_disconnected(); |
| 57 | if (s_services_running) stop_services(); | 57 | if (s_services_running) stop_services(); |
| 58 | if (s_retry_count < MAX_STA_RETRY) { | 58 | if (s_retry_count < MAX_STA_RETRY) { |
| 59 | vTaskDelay(pdMS_TO_TICKS(2000)); | ||
| 59 | esp_wifi_connect(); | 60 | esp_wifi_connect(); |
| 60 | } else { | 61 | } else { |
| 61 | wifi_config_t wifi_cfg; | 62 | wifi_config_t wifi_cfg; |
| @@ -305,6 +306,9 @@ void app_main(void) | |||
| 305 | ESP_LOGI(TAG, "STA configured for SSID: %s", tcfg2->networks[tcfg2->current_network].ssid); | 306 | ESP_LOGI(TAG, "STA configured for SSID: %s", tcfg2->networks[tcfg2->current_network].ssid); |
| 306 | } | 307 | } |
| 307 | 308 | ||
| 309 | ESP_ERROR_CHECK(esp_wifi_set_country_code("DE", false)); | ||
| 310 | ESP_LOGI(TAG, "WiFi country code set to DE (EU regulatory domain)"); | ||
| 311 | |||
| 308 | ESP_ERROR_CHECK(esp_wifi_start()); | 312 | ESP_ERROR_CHECK(esp_wifi_start()); |
| 309 | 313 | ||
| 310 | ESP_LOGI(TAG, "WiFi AP+STA started, waiting for connection..."); | 314 | ESP_LOGI(TAG, "WiFi AP+STA started, waiting for connection..."); |