fix: use WiFi.macAddress() instead of esp_read_mac (not in Arduino scope)
This commit is contained in:
parent
0af5994bcf
commit
27e67d5c72
@ -50,6 +50,7 @@
|
||||
#include <BLEServer.h>
|
||||
#include <BLEUtils.h>
|
||||
#include <BLE2902.h>
|
||||
#include <WiFi.h>
|
||||
#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]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user