I am running into a situation with the latest LWIP source that I am hoping someone can help me with.
Specifically I am trying to start LWIP with one MAC-address (factory default), accept a message over TCP to change the MAC address (permanently to a unique value) and bring the network interface back up with the new MAC-ID without restarting
the system. Everything I try has failed. I have tried all combinations of brining the network interface down, modifying the MAC-Address, bringing the network interface back up, removing and re-adding the network interface, etc. Everything I have tried has
resulted in either the network interface not starting on initial boot or not functioning after the new MAC address is assigned. I though originally it was related to DHCP not restarting – upon further inspection and testing under a static IP this is not the
case. Any recommendations on how to properly change the MAC-ID and bring the interface back up is appreciated. The only documentation I have found is from one person saying not to do this located here:
I feel I should be able to accomplish this – and I can with a restart of the system. However, I do not want to restart the system – I want to finish my factory tests – which I can’t as the network interface never comes back with the new
Here is the current function I am using to change the MAC (some temp code exists in here):
èPriot to the below code I bring down the network interface (netifapi_netif_set_down( &netif ))