Hi,
I'm trying to change the MAC address like this:
volatile netStatus aaa; osThreadSetPriority (osThreadGetId(), osPriorityHigh); netInitialize (); aaa = netIF_SetOption (NET_IF_CLASS_ETH | 0, netIF_OptionMAC_Address, SystemData.MAC, sizeof(SystemData.MAC)); osThreadSetPriority (osThreadGetId(), osPriorityNormal);
MAC is defined as "uint8_t MAC[NET_ADDR_ETH_LEN]"
But when executing this the return code is "netInvalidParameter" and the board starts with the MAC defined in Net_Config_ETH0.h
Can anybody help me?
Thanks
You probably have a Multicast bit set in new MAC address. netIF_SetOption fails if multicast bit is set.
Hi Franc,
You are right, solved :)
Many thanks