How can I change the G120E EthernetBuiltIn MAC address from my application program and have it persist across boot cycles and power cycles? I know that FEZ Config will program the MAC semi-permanently, however I need to do this from my application.
I have tried setting the PhysicalAddress in both the BaseInterface and NetworkInterface objects, and either will set the MAC for the session but it will not persist across a boot cycle, much less a power cycle.
I have found the Processor.Configuration(“NETWORK”) entry which contains the addresses in the byte stream, but making the modification this way seems like a hack. Is there a better way? ???
I found the GHI.Processor.Configuration class that exposes the configuration information, and specifically the “NETWORK” entry that holds the MAC addresses for the 4 supported interfaces. Unfortunately the byte stream returned appears to be some form of serialized class data. So even though I have reverse-engineered the exact bytes in the “NETWORK” configuration that hold the MAC address I want to update, those byte positions could easily change with a future release of GHI’s SDK and my application would cease to function.
That’s as close as I can get to an API to change the config.