Mac Address Format

Hello,

I use ESP8266 and ESP_NOW library to communicate multiple modules. Since I communicated two modules at the beginning, I was directly entering the MAC address in the program code as follows,

uint8_t broadcastAddress[] = { 0x5A, 0xDF, 0x4F, 0x6E, 0x35, 0x0C };

but as the number of modules increased, I wanted to read the MAC addresses of the modules included in the system with code and upload these addresses to a series of variables (or save them to EPPROM), but I get the MAC addresses I read as follows,

5A:DF:4F:6E:35:0C (This is coming from a String variable)

but I could not convert it to the format I should use. I would be grateful if you could help me assign these MAC addresses into the variable in the proper format. Thank you...

Did you try Google? e.g. "Arduino convert MAC string to array of bytes" gives you a couple of hits that can point you in the right direction.

https://forum.arduino.cc/index.php?topic=693751.0

and a few more. If you have trouble getting the format you want please post your code (use code tags).