Actualy log the SSID when retrying

This commit is contained in:
Matt
2025-12-15 00:05:00 +00:00
parent f3f6b96bc9
commit 40630a2123

View File

@@ -56,7 +56,7 @@ static void event_handler(void *arg, esp_event_base_t event_base,
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) { if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_connect(); esp_wifi_connect();
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
ESP_LOGI(TAG, "Retry connecting to AP..."); ESP_LOGI(TAG, "Retry connecting to AP %s", ssid);
esp_wifi_connect(); esp_wifi_connect();
// In a real product, we might count retries and switch to AP mode if failing. // In a real product, we might count retries and switch to AP mode if failing.
// For now, infinite retry is simple. // For now, infinite retry is simple.