From 27e67d5c72c26f95c423e25f149ac1f401953238 Mon Sep 17 00:00:00 2001 From: Salty Bead Date: Mon, 30 Mar 2026 09:24:39 -0400 Subject: [PATCH] fix: use WiFi.macAddress() instead of esp_read_mac (not in Arduino scope) --- esp32/uwb_tag/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esp32/uwb_tag/src/main.cpp b/esp32/uwb_tag/src/main.cpp index 81db9d1..b5c613f 100644 --- a/esp32/uwb_tag/src/main.cpp +++ b/esp32/uwb_tag/src/main.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include "DW1000Ranging.h" #include "DW1000.h" @@ -1002,9 +1003,9 @@ void setup(void) { Serial.printf("\r\n[uwb_tag] tag_id=0x%02X starting (v2 — UWB data frames)\r\n", TAG_ID); - /* Build BLE device name from MAC */ + /* Build BLE device name from WiFi MAC last 4 hex digits */ uint8_t mac[6]; - esp_read_mac(mac, ESP_MAC_BT); + WiFi.macAddress(mac); snprintf(g_ble_device_name, sizeof(g_ble_device_name), "UWB_TAG_%02X%02X", mac[4], mac[5]);