Get and set mac address

15 Sep 2012

Hi just a quick question with the new Ethernet library can we still get and set mac address ?

many thanks chris

15 Sep 2012

Not sure about get but you can still set it with

extern "C" void mbed_mac_address(char *mac) { mac[0]=0x00; mac[1]=0x02; mac[2]=0xf7; mac[3]=0xf0; mac[4]=0x22; mac[5]=0x45; } // this is required to set the mac address as there is no mbed chip on lpcxpresso
 
char mac[16]; 

I did this when implementing the new official libraries on the LPCxpresso

15 Sep 2012

I added a getMACAddress() to the current ethernet library - might be the same thing you are looking for.

Import libraryEthernetInterface

adds getMACAddress() like getIPAddress(). Initializes in constructor.

15 Sep 2012

Thank you very much for the info

Cheers Chris