From 05faa8f21336615ed5ead019076ccc53be43cb54 Mon Sep 17 00:00:00 2001 From: zhanghaipeng Date: Mon, 3 Jul 2023 15:36:41 +0800 Subject: [PATCH] fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32 - Add a log statement to print the Bluetooth MAC address --- components/bt/controller/esp32/bt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index ada104aa9f..3c141a2cc8 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -908,7 +908,11 @@ static void *malloc_internal_wrapper(size_t size) static int32_t IRAM_ATTR read_mac_wrapper(uint8_t mac[6]) { - return esp_read_mac(mac, ESP_MAC_BT); + int ret = esp_read_mac(mac, ESP_MAC_BT); + ESP_LOGI(BTDM_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + + return ret; } static void IRAM_ATTR srand_wrapper(unsigned int seed)