I have ran into an issue and don't seem to be able to get past it. Can anyone help me please.
I need to publish the MAC address of my esp32 to mqtt broker. Now other things publish without a hitch however the mac address is not.
This is my code i am using. Where am I going wrong .
byte mac[6];
WiFi.macAddress(mac);
char macStr[18];
sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
client.publish("Devices/MACc Address", macStr);
Serial.print("Published MAC address: ");
Serial.println(macStr);
Thanks in advance