File tree Expand file tree Collapse file tree 4 files changed +14
-20
lines changed Expand file tree Collapse file tree 4 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,14 @@ void printCurrentNet() {
9797}
9898
9999void printMacAddress (byte mac[]) {
100- for (int i = 5 ; i >= 0 ; i--) {
100+ for (int i = 0 ; i < 6 ; i++) {
101+ if (i > 0 ) {
102+ Serial.print (" :" );
103+ }
101104 if (mac[i] < 16 ) {
102105 Serial.print (" 0" );
103106 }
104107 Serial.print (mac[i], HEX);
105- if (i > 0 ) {
106- Serial.print (" :" );
107- }
108108 }
109109 Serial.println ();
110110}
Original file line number Diff line number Diff line change 55 connect to any network, so no encryption scheme is specified.
66
77 Circuit:
8- * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2)
8+ * Portenta C33
99
1010 created 13 July 2010
1111 by dlf (Metodo2 srl)
@@ -108,14 +108,14 @@ void printEncryptionType(int thisType) {
108108}
109109
110110void printMacAddress (byte mac[]) {
111- for (int i = 5 ; i >= 0 ; i--) {
111+ for (int i = 0 ; i < 6 ; i++) {
112+ if (i > 0 ) {
113+ Serial.print (" :" );
114+ }
112115 if (mac[i] < 16 ) {
113116 Serial.print (" 0" );
114117 }
115118 Serial.print (mac[i], HEX);
116- if (i > 0 ) {
117- Serial.print (" :" );
118- }
119119 }
120120 Serial.println ();
121121}
Original file line number Diff line number Diff line change 66 BSSID and WiFi channel are printed
77
88 Circuit:
9- * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2)
9+ * Portenta C33
1010
1111 This example is based on ScanNetworks
1212
@@ -130,14 +130,14 @@ void print2Digits(byte thisByte) {
130130}
131131
132132void printMacAddress (byte mac[]) {
133- for (int i = 5 ; i >= 0 ; i--) {
133+ for (int i = 0 ; i < 6 ; i++) {
134+ if (i > 0 ) {
135+ Serial.print (" :" );
136+ }
134137 if (mac[i] < 16 ) {
135138 Serial.print (" 0" );
136139 }
137140 Serial.print (mac[i], HEX);
138- if (i > 0 ) {
139- Serial.print (" :" );
140- }
141141 }
142142 Serial.println ();
143143}
Original file line number Diff line number Diff line change @@ -173,12 +173,6 @@ uint8_t* CWifi::macAddress(uint8_t* mac) {
173173/* -------------------------------------------------------------------------- */
174174 if (ni != nullptr ) {
175175 if (ni->getMacAddress (mac) == WL_MAC_ADDR_LENGTH) {
176- // internal mac address representation is inverted
177- for (int i = 0 ; i<3 ; i++) {
178- auto tmp = mac[i];
179- mac[i] = mac[5 -i];
180- mac[5 -i] = tmp;
181- }
182176 return mac;
183177 }
184178 }
You can’t perform that action at this time.
0 commit comments