Skip to content

Commit 2cd9da5

Browse files
committed
Merge branch 'feat/print_the_ble_mac_when_init_5.2' into 'release/v5.2'
feat(ble): Print out the BT mac when the controller is initialized See merge request espressif/esp-idf!32731
2 parents 726d796 + 1c0a4db commit 2cd9da5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

components/bt/controller/esp32c2/bt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,9 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
814814
uint8_t mac[6];
815815
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
816816

817+
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
818+
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
819+
817820
swap_in_place(mac, 6);
818821

819822
esp_ble_ll_set_public_addr(mac);

components/bt/controller/esp32c6/bt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,8 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
890890
}
891891

892892
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
893+
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
894+
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
893895
swap_in_place(mac, 6);
894896
r_esp_ble_ll_set_public_addr(mac);
895897

components/bt/controller/esp32h2/bt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,8 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
860860
goto free_controller;
861861
}
862862
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
863+
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
864+
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
863865
swap_in_place(mac, 6);
864866
r_esp_ble_ll_set_public_addr(mac);
865867

0 commit comments

Comments
 (0)