Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/WiFi/examples/ConnectWithWPA/ConnectWithWPA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,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();
}
10 changes: 5 additions & 5 deletions libraries/WiFi/examples/ScanNetworks/ScanNetworks.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* Portenta C33

created 13 July 2010
by dlf (Metodo2 srl)
Expand Down Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* Portenta C33

This example is based on ScanNetworks

Expand Down Expand Up @@ -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();
}
6 changes: 0 additions & 6 deletions libraries/WiFi/src/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ uint8_t* CWifi::macAddress(uint8_t* mac) {
/* -------------------------------------------------------------------------- */
if(ni != nullptr) {
if(ni->getMacAddress(mac) == WL_MAC_ADDR_LENGTH) {
// internal mac address representation is inverted
for (int i = 0; i<3; i++) {
auto tmp = mac[i];
mac[i] = mac[5-i];
mac[5-i] = tmp;
}
return mac;
}
}
Expand Down