- Fri Jul 08, 2016 3:06 pm
#50415
There is two ESP.softAPmacAddress() methods, one not having any argument and returning a String, and the other with "uint8_t* mac" argument to allow it to store result.
In your example, you seems to use the second one but we don't see how you've declared "mac" and what getMacAddress() function is doing.
You should simply use :
Code: Select allclientName += ESP.softAPmacAddress();
If you really wish to use the second one, it will becomes more complicated :
Code: Select alluint8_t mac[6];
char macStr[18];
ESP.softAPmacAddress(&mac);
sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
clientName += macStr;
Finally, I don't see the relation with rtc_mem issue you've faced. Maybe showing more code could help to have the full view.
BTW, when you say "This API is not present in 8266 SDK doc", which API are you talking about, the rtc_mem ? It is simply a memory location, so there is not really much API to be documented, other than system_rtc_mem_read() and system_rtc_mem_write() present in native SDK under sdk/include/user_interface.h, which is what Arduino core is using.