1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include "esp_mac.h" #include "esp_log.h" /** * * * @return STA Radio WiFi MAC Address */ uint8_t* get_wifi_mac(void) { static uint8_t mac[6]; if (!*mac) esp_read_mac(mac, ESP_MAC_WIFI_STA); return mac; }