Browse Source

Merge branch 'fix/print_bt_mac_for_esp32' into 'master'

fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32

See merge request espressif/esp-idf!24552
Chen Jian Hua 2 years ago
parent
commit
5ebe3b0fc2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      components/bt/controller/esp32/bt.c

+ 5 - 1
components/bt/controller/esp32/bt.c

@@ -864,7 +864,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)