diff --git a/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino b/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino index 7b8915bb9..850b9044b 100644 --- a/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino +++ b/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino @@ -100,14 +100,14 @@ void printCurrentNet() { } void printMacAddress(byte mac[]) { - for (int i = 5; i >= 0; i--) { + for (int i = 0; i < 6; i++) { + if (i > 0) { + Serial.print(":"); + } if (mac[i] < 16) { Serial.print("0"); } Serial.print(mac[i], HEX); - if (i > 0) { - Serial.print(":"); - } } Serial.println(); } diff --git a/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino b/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino index 49747d64b..252676aaf 100644 --- a/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino +++ b/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino @@ -5,7 +5,7 @@ connect to any network, so no encryption scheme is specified. Circuit: - * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) + * Uno R4 WiFi created 13 July 2010 by dlf (Metodo2 srl) @@ -108,14 +108,14 @@ void printEncryptionType(int thisType) { void printMacAddress(byte mac[]) { - for (int i = 5; i >= 0; i--) { + for (int i = 0; i < 6; i++) { + if (i > 0) { + Serial.print(":"); + } if (mac[i] < 16) { Serial.print("0"); } Serial.print(mac[i], HEX); - if (i > 0) { - Serial.print(":"); - } } Serial.println(); } diff --git a/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino b/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino index 9a32c37c9..fb7df4d9a 100644 --- a/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino +++ b/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino @@ -6,7 +6,7 @@ BSSID and WiFi channel are printed Circuit: - * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) + * Uno R4 WiFi This example is based on ScanNetworks @@ -130,14 +130,14 @@ void print2Digits(byte thisByte) { } void printMacAddress(byte mac[]) { - for (int i = 5; i >= 0; i--) { + for (int i = 0; i < 6; i++) { + if (i > 0) { + Serial.print(":"); + } if (mac[i] < 16) { Serial.print("0"); } Serial.print(mac[i], HEX); - if (i > 0) { - Serial.print(":"); - } } Serial.println(); } diff --git a/libraries/WiFiS3/src/WiFi.h b/libraries/WiFiS3/src/WiFi.h index 587d1648a..9958b7c17 100644 --- a/libraries/WiFiS3/src/WiFi.h +++ b/libraries/WiFiS3/src/WiFi.h @@ -33,7 +33,6 @@ class CWifi { private: void _config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2); unsigned long _timeout; - uint8_t mac[6]; std::vector access_points; std::string ssid; std::string apssid;