I have an Apple Airport Extreme router and I'm trying to use the DHCP Reservation Setup to create a static IP address that I can use for the Ethernet Shield but I need to list the MAC address for the shield in the setup along with the IP address.
Using the default mac address listed in the examples for the shield:
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
I can get my static IP address setup and working with my Apple Airport Extreme router using the DHCP Reservation Setup as long as I provide the MAC address of:
de:ad:be:ef:fe:ed
Now can you tell me how to make that conversion? Its fine for now but if I ever add another ethernet shield I'm going to have a problem.
I guess I'm asking for something a little deeper. I realized that for this example the letters just dropped down into a row. Thank you, I didn't know that prior to this. Now I'm just looking for more information on how to do a conversation that would cover all scenarios.
A mac address is always 6 bytes long, how they are seperated varies, but is usually colons. They are invariably expressed in hexdecimal notation (base 16, uses the characters 0-9 + A-F - each byte uses 2 characters since 16 * 16 is 256). Sometimes the letters are upper case, sometimes lower case, but never mixed. IP addresses on the other hand are now 4 bytes (until IPv6 happens) and almost always expressed in Decimal format as a number 0 - 255.
On a more involved level (which you don't really need to know for setting up routers and stuff) mac addresses are usually unique to a device and you can't have more than 1 of that number on a local (non routed) network. The first 3 bytes designate the manufacturer and the last three are a number given to it at manufacture by the maker. That doesn't mean to say they can't be changed or spoofed and often are. The mac address isn't routable over TCP/IP (the internet) so devices with the same mac address can exist on the internet at large. Real Mac addresses usually start with zero (00) since they haven't got past 65536 different manufacturers yet.
Thanks for that extra information. That is helpful. Just so that I understand, what number base is the sketch in? Is that hexadecimal? I guess I'm having a hard time understanding what the '0x' represents in front of the characters. I guess this isn't important now that I know I can simply change some of the letters to create another unique mac address for future ethernet shields.
Just out of curiosity are you able to convert the mac address 00:1f:f3:d7:09:4c that I used as an example in my first post to the format that you would use in the sketch?