From 1c455ac177512263816c45648d9d1dc2aed3b94b Mon Sep 17 00:00:00 2001 From: Blue Fox Date: Mon, 29 May 2023 17:53:46 +0200 Subject: [PATCH] Now logging the SSID of the network to connect to in all error logs (about wifi) --- wifi.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifi.ino b/wifi.ino index e250712..b586df9 100755 --- a/wifi.ino +++ b/wifi.ino @@ -22,11 +22,11 @@ bool connectWiFi() { // connect to the wifi with the above defined credentials while(WiFi.status() != WL_CONNECTED) { delay(2000); Serial.printf("."); if(WiFi.status() == WL_NO_SSID_AVAIL) { - Serial.println("\n[WiFi] Failed to connect to WiFi. Reason: WL_NO_SSID_AVAIL"); + Serial.printf("\n[WiFi] Failed to connect to WiFi \"%s\". Reason: WL_NO_SSID_AVAIL\n", wiFiSSID); blinkLED(LED_ON_WIFI_ERROR); return false; } else if(WiFi.status() == WL_CONNECT_FAILED) { - Serial.println("\n[WiFi] Failed to connect to WiFi. Reason: WL_CONNECT_FAILED"); + Serial.printf("\n[WiFi] Failed to connect to WiFi \"%s\". Reason: WL_CONNECT_FAILED\n", wiFiSSID); blinkLED(LED_ON_WIFI_ERROR); return false; }