Actualy log the SSID when retrying
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user