From 7344b1b50bcb3e1fc24b164cd601dd7cbce582c1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2026 20:41:16 +0530 Subject: feat: WiFi country code DE + retry delay + updated docs - Add esp_wifi_set_country_code('DE') before WiFi start for EU regulatory compliance - Add 2s delay between WiFi auth retries to avoid AP rate limiting - Update AGENTS.md with CVM modules, board C, per-board locks, WiFi notes - Update CHECKLIST.md with Phase 7b completion, 7c integration progress - Update PLAN.md with test cases 53-73, WiFi country code findings - Update Makefile port defaults (A=ACM0, B=ACM1) - Board B connects to WiFi successfully with these fixes - Board A has hardware WiFi issue (auth fails on all APs) --- main/tollgate_main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/tollgate_main.c') 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, tollgate_client_on_sta_disconnected(); if (s_services_running) stop_services(); if (s_retry_count < MAX_STA_RETRY) { + vTaskDelay(pdMS_TO_TICKS(2000)); esp_wifi_connect(); } else { wifi_config_t wifi_cfg; @@ -305,6 +306,9 @@ void app_main(void) ESP_LOGI(TAG, "STA configured for SSID: %s", tcfg2->networks[tcfg2->current_network].ssid); } + ESP_ERROR_CHECK(esp_wifi_set_country_code("DE", false)); + ESP_LOGI(TAG, "WiFi country code set to DE (EU regulatory domain)"); + ESP_ERROR_CHECK(esp_wifi_start()); ESP_LOGI(TAG, "WiFi AP+STA started, waiting for connection..."); -- cgit v1.2.3