1

I am working on an Arduino application which is dependant on a certain library. This library uses the Ethernet class for network communications, but ideally, I would like it to be wireless (I have both an Ethernet and WiFi shield available for testing).

When working on replacing the Ethernet functionality of the library with the corresponding WiFi functionality, I noticed that the Ethernet.begin() function requires a MAC address while the WiFi.begin() doesn't (it instead accepts SSID and password, among a couple of other things).

As both come shipped with a MAC address sticker on them, I couldn't really figure out why this is the case (and if I need to supply the MAC address found on the WiFi shield in some other fashion).

Why is this the case?

1

The flip answer would be "because it doesn't need it…"

I think what is going on is that older Ethernet shields did not have a MAC address and it was necessary for the code to set one (and I would guess that on at least some of them you can still set the MAC address, overriding the one that is on the sticker).

WiFi cards, I would guess, are newer and the MAC address is always there, so there is no need to require you to assign it.

1
  • I think this is because [most] WiFi cards already have a firmware, which holds the MAC address and that's why changing it on a WiFi card is only possible if the firmware allows it. With Ethernet there is no firmware needed, or simply put the Arduino is the firmware. – user16306 Jan 11 '16 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.