Go Down

Topic: Mac addresses returned in reverse order in examples (Read 1 time) previous topic - next topic

david-

Just in case for some bizarre reason it is different in other parts of the planet I have to state that I am using the shield in the uk.

My router reports that the mac address of the shield and of itself is in the reverse order of that shown in the example sketches.

This created difficulty when I started to configure my router to allocate a fixed IP to the WiFi101 shield. The router allocates the IP to the mac address I supply. Once I reversed the mac address supplied by the sketch, it worked.

Simply printing the mac address in the reverse order solves the issue:
Code: [Select]

  // print your MAC address:
  byte mac[6];
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  Serial.print(mac[0], HEX);
  Serial.print(":");
  Serial.print(mac[1], HEX);
  Serial.print(":");
  Serial.print(mac[2], HEX);
  Serial.print(":");
  Serial.print(mac[3], HEX);
  Serial.print(":");
  Serial.print(mac[4], HEX);
  Serial.print(":");
  Serial.println(mac[5], HEX);



David


sandeepmistry

@david this has been corrected in the following commit: https://github.com/arduino-libraries/WiFi101/commit/b3110e2fe6a651667bb1daf630dec767679a9491. Version 0.8.0 of the library has been released with the change.

Go Up