9 years, 4 months ago.

Change MAC address ?

Hi all, I need to change the mac address of my K64F? I contacted freescale regarding this issue and they told me that board doesnt come with the mac address, it is weakly define. I compiled some of their codes using KDSK 1.3.0 and saw that mac address of k64f was different as compared to mac address generated by mbed etherent examples. it means freescale has their own library for generating mac address and mbed has their own way of generating mac addresses. If I am not wrong it is defined in mbed_interface.c library.

Can any one help me to generate my own mac address?? I asked this question actually mbed_interface.c library uses UID to generate the mac address and I am struggling to find this UID code.

Thanks in advance.

Hi all, I am answering my own question, in order to change the mac address we need to go to mbed_interface.h, which is in mbed-src library and need to replace the mac address code with the following one:

#define MBED_MAC_ADDR_INTERFACE 0x01
#define MBED_MAC_ADDR_0  0x02
#define MBED_MAC_ADDR_1  0x31
#define MBED_MAC_ADDR_2  0x70
#define MBED_MAC_ADDR_3  0x07
#define MBED_MAC_ADDR_4  0x00
#define MBED_MAC_ADDR_5  0x29
#define MBED_MAC_ADDRESS_SUM (MBED_MAC_ADDR_0 | MBED_MAC_ADDR_1 | MBED_MAC_ADDR_2 | MBED_MAC_ADDR_3 | MBED_MAC_ADDR_4 | MBED_MAC_ADDR_5)

posted by zain aftab 08 Jul 2015
Be the first to answer this question.