Closed Korcsog closed 5 years ago
Hi!
Is it possible to implement the custom mac address based Name and serial number generation?
void create_accessory_name() { //printf("RC > Creating accessory name\n"); uint8_t macaddr[6]; **system_efuse_read_mac(macaddr);** char *name_value = malloc(17); snprintf(name_value, 17, "Camera-%02X%02X%02X", macaddr[3], macaddr[4], macaddr[5]); name.value = HOMEKIT_STRING(name_value); char *serial_value = malloc(13); snprintf(serial_value, 13, "%02X%02X%02X%02X%02X%02X", macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]); serial.value = HOMEKIT_STRING(serial_value); }
Also is system_efuse_read_mac() enough for this purpose? Or Wifi mac needed?
system_efuse_read_mac()
Thanks!
Tried it, works well so I close this!
Hi!
Is it possible to implement the custom mac address based Name and serial number generation?
Also is
system_efuse_read_mac()
enough for this purpose? Or Wifi mac needed?Thanks!