diff --git a/src/network_interfaces/Wippersnapper_AIRLIFT.h b/src/network_interfaces/Wippersnapper_AIRLIFT.h index accd9128f..84a220760 100644 --- a/src/network_interfaces/Wippersnapper_AIRLIFT.h +++ b/src/network_interfaces/Wippersnapper_AIRLIFT.h @@ -180,19 +180,24 @@ class Wippersnapper_AIRLIFT : public Wippersnapper { // User-set network not found, print scan results to serial console WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!"); - WS_DEBUG_PRINT("WipperSnapper found these WiFi networks"); - if (n > WS_MAX_SORTED_NETWORKS) { - WS_DEBUG_PRINT(" (only first "); - WS_DEBUG_PRINT(WS_MAX_SORTED_NETWORKS); - WS_DEBUG_PRINTLN(" used):"); - } else { - WS_DEBUG_PRINTLN(":"); - } - for (int i = 0; i < n; ++i) { - WS_DEBUG_PRINT(networks[i].ssid); - WS_DEBUG_PRINT(" "); - WS_DEBUG_PRINT(networks[i].rssi); - WS_DEBUG_PRINTLN("dB"); + WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks:"); + for (uint8_t i = 0; i < n; ++i) + { + WS_DEBUG_PRINT(WiFi.SSID(i)); + WS_DEBUG_PRINT(" ("); + uint8_t BSSID[WL_MAC_ADDR_LENGTH]; + WiFi.BSSID(i, BSSID); + for (int m = 0; m < WL_MAC_ADDR_LENGTH; m++) + { + if (m != 0) + WS_DEBUG_PRINT(":"); + WS_DEBUG_PRINTHEX(BSSID[m]); + } + WS_DEBUG_PRINT(") "); + WS_DEBUG_PRINT(WiFi.RSSI(i)); + WS_DEBUG_PRINT("dB (ch"); + WS_DEBUG_PRINT(WiFi.channel(i)) + WS_DEBUG_PRINTLN(")"); } return false; diff --git a/src/network_interfaces/Wippersnapper_ESP32.h b/src/network_interfaces/Wippersnapper_ESP32.h index 4b2158b96..f42b112e4 100644 --- a/src/network_interfaces/Wippersnapper_ESP32.h +++ b/src/network_interfaces/Wippersnapper_ESP32.h @@ -193,19 +193,24 @@ class Wippersnapper_ESP32 : public Wippersnapper { // User-set network not found, print scan results to serial console WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!"); - WS_DEBUG_PRINT("WipperSnapper found these WiFi networks"); - if (n > WS_MAX_SORTED_NETWORKS) { - WS_DEBUG_PRINT(" (only first "); - WS_DEBUG_PRINT(WS_MAX_SORTED_NETWORKS); - WS_DEBUG_PRINTLN(" used):"); - } else { - WS_DEBUG_PRINTLN(":"); - } - for (int i = 0; i < n; ++i) { - WS_DEBUG_PRINT(networks[i].ssid); - WS_DEBUG_PRINT(" "); - WS_DEBUG_PRINT(networks[i].rssi); - WS_DEBUG_PRINTLN("dB"); + WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks:"); + for (uint8_t i = 0; i < n; ++i) + { + WS_DEBUG_PRINT(WiFi.SSID(i)); + WS_DEBUG_PRINT(" ("); + uint8_t BSSID[WL_MAC_ADDR_LENGTH]; + WiFi.BSSID(i, BSSID); + for (int m = 0; m < WL_MAC_ADDR_LENGTH; m++) + { + if (m != 0) + WS_DEBUG_PRINT(":"); + WS_DEBUG_PRINTHEX(BSSID[m]); + } + WS_DEBUG_PRINT(") "); + WS_DEBUG_PRINT(WiFi.RSSI(i)); + WS_DEBUG_PRINT("dB (ch"); + WS_DEBUG_PRINT(WiFi.channel(i)) + WS_DEBUG_PRINTLN(")"); } return false; diff --git a/src/network_interfaces/Wippersnapper_ESP8266.h b/src/network_interfaces/Wippersnapper_ESP8266.h index ec7ac99c1..4032df142 100644 --- a/src/network_interfaces/Wippersnapper_ESP8266.h +++ b/src/network_interfaces/Wippersnapper_ESP8266.h @@ -205,20 +205,24 @@ class Wippersnapper_ESP8266 : public Wippersnapper { } // User-set network not found, print scan results to serial console - WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!"); - WS_DEBUG_PRINT("WipperSnapper found these WiFi networks"); - if (n > WS_MAX_SORTED_NETWORKS) { - WS_DEBUG_PRINT(" (only first "); - WS_DEBUG_PRINT(WS_MAX_SORTED_NETWORKS); - WS_DEBUG_PRINTLN(" used):"); - } else { - WS_DEBUG_PRINTLN(":"); - } - for (int i = 0; i < n; ++i) { - WS_DEBUG_PRINT(networks[i].ssid); - WS_DEBUG_PRINT(" "); - WS_DEBUG_PRINT(networks[i].rssi); - WS_DEBUG_PRINTLN("dB"); + WS_DEBUG_PRINTLN("ERROR: Your WiFi network was not found!"); + WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks:"); + for (uint8_t i = 0; i < n; ++i) + { + WS_DEBUG_PRINT(WiFi.SSID(i)); + WS_DEBUG_PRINT(" ("); + const uint8_t* BSSID = WiFi.BSSID(i); + for (int m = 0; m < WL_MAC_ADDR_LENGTH; m++) + { + if (m != 0) + WS_DEBUG_PRINT(":"); + WS_DEBUG_PRINTHEX(BSSID[m]); + } + WS_DEBUG_PRINT(") "); + WS_DEBUG_PRINT(WiFi.RSSI(i)); + WS_DEBUG_PRINT("dB (ch"); + WS_DEBUG_PRINT(WiFi.channel(i)) + WS_DEBUG_PRINTLN(")"); } return false; diff --git a/src/network_interfaces/Wippersnapper_WIFININA.h b/src/network_interfaces/Wippersnapper_WIFININA.h index a713b625d..77bfefe72 100644 --- a/src/network_interfaces/Wippersnapper_WIFININA.h +++ b/src/network_interfaces/Wippersnapper_WIFININA.h @@ -189,19 +189,24 @@ class Wippersnapper_WIFININA : public Wippersnapper { // User-set network not found, print scan results to serial console WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!"); - WS_DEBUG_PRINT("WipperSnapper found these WiFi networks"); - if (n > WS_MAX_SORTED_NETWORKS) { - WS_DEBUG_PRINT(" (only first "); - WS_DEBUG_PRINT(WS_MAX_SORTED_NETWORKS); - WS_DEBUG_PRINTLN(" used):"); - } else { - WS_DEBUG_PRINTLN(":"); - } - for (int i = 0; i < n; ++i) { - WS_DEBUG_PRINT(networks[i].ssid); - WS_DEBUG_PRINT(" "); - WS_DEBUG_PRINT(networks[i].rssi); - WS_DEBUG_PRINTLN("dB"); + WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks:"); + for (uint8_t i = 0; i < n; ++i) + { + WS_DEBUG_PRINT(WiFi.SSID(i)); + WS_DEBUG_PRINT(" ("); + uint8_t BSSID[WL_MAC_ADDR_LENGTH]; + WiFi.BSSID(i, BSSID); + for (int m = 0; m < WL_MAC_ADDR_LENGTH; m++) + { + if (m != 0) + WS_DEBUG_PRINT(":"); + WS_DEBUG_PRINTHEX(BSSID[m]); + } + WS_DEBUG_PRINT(") "); + WS_DEBUG_PRINT(WiFi.RSSI(i)); + WS_DEBUG_PRINT("dB (ch"); + WS_DEBUG_PRINT(WiFi.channel(i)) + WS_DEBUG_PRINTLN(")"); } return false; diff --git a/src/network_interfaces/ws_networking_pico.h b/src/network_interfaces/ws_networking_pico.h index 342a70dc7..43b35900e 100644 --- a/src/network_interfaces/ws_networking_pico.h +++ b/src/network_interfaces/ws_networking_pico.h @@ -186,13 +186,16 @@ class ws_networking_pico : public Wippersnapper { // User-set network not found, print scan results to serial console WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!"); WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks:"); - for (uint8_t i = 0; i < n; ++i) { + for (uint8_t i = 0; i < n; ++i) + { WS_DEBUG_PRINT(WiFi.SSID(i)); WS_DEBUG_PRINT(" ("); uint8_t BSSID[WL_MAC_ADDR_LENGTH]; WiFi.BSSID(i, BSSID); - for (int m = 0; m < WL_MAC_ADDR_LENGTH; ++m) { - if (m != 0) WS_DEBUG_PRINT(":"); + for (int m = 0; m < WL_MAC_ADDR_LENGTH; m++) + { + if (m != 0) + WS_DEBUG_PRINT(":"); WS_DEBUG_PRINTHEX(BSSID[m]); } WS_DEBUG_PRINT(") ");