1 2 3 4 5 6 7 8 9 10 11 12
#include "esp_mac.h" #include "esp_log.h" uint8_t* get_wifi_mac(void) { static uint8_t mac[6]; if (!*mac) esp_read_mac(mac, ESP_MAC_WIFI_STA); return mac; }