diff options
| author | Your Name <you@example.com> | 2026-05-18 20:41:16 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 20:41:16 +0530 |
| commit | 7344b1b50bcb3e1fc24b164cd601dd7cbce582c1 (patch) | |
| tree | ed639e1748d9b461fc77e9587c5de6142c243781 /main | |
| parent | 06de1143037399bb96308df0ea4290faa79de9dc (diff) | |
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)
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..."); |