Moderator: igrr
I have tried EEPROM.begin, then EEPROM.read but it returns zero value.
How can I change STATION MAC dynamically from a FILE or EEPROM or any non-volatile memory?
Thanks.
If so you could have a flag and mac address in RTC user memory. initVariant checks the flag, if its not set which it wouldn't be at first power on then just carry on. In setup it also checks the RTC flag and if not set then gets the mac address from wherever and saves it in RTC user memory, sets the flag in RTC memory, and does a restart with deepSleep(1) (or perhaps just ESP.restart might work?). On this next startup initVariant sees the RTC flag is set so it gets the mac address from RTC user memory and calls wifi_set_macaddr.
A little convoluted!
So this is a solution, but I would be happy to hear if there is a better idea than that without restarting?
Thanks in advance for your support.