This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Retrieve BLE MAC address in Zephyr environment

When using the nRF5 SDK v17.x development environment, the BLE MAC address can be retrieved using:

Fullscreen
1
2
3
4
ble_gap_addr_t mac;
// Get MAC address
sd_ble_gap_addr_get(&mac);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This will return the assigned MAC address (eg. from the nRF52840 on a Laird Module).     Does a similar call exist when using nRF Connect SDK (NCS)   (I see void bt_id_get(bt_addr_le_t *addrs, size_t *count), but the description leaves questions...)?

Thanks!