i am using NRF52832 and I'm using nRF5_SDK_17.1.0 i am using BLE_APP_UART code from this SDK. now i want to get my MAC id of BLE so how can i get that in code ? please help me in this matter.
i am using NRF52832 and I'm using nRF5_SDK_17.1.0 i am using BLE_APP_UART code from this SDK. now i want to get my MAC id of BLE so how can i get that in code ? please help me in this matter.
Hi,
You can read and log the address like this:
ret_code_t err_code;
ble_gap_addr_t device_addr;
err_code = sd_ble_gap_addr_get(&device_addr);
VERIFY_SUCCESS(err_code);
NRF_LOG_INFO("BT addr: %x:%x:%x:%x:%x:%x\r\n", device_addr.addr[5], device_addr.addr[4],
device_addr.addr[3], device_addr.addr[2], device_addr.addr[1], device_addr.addr[0]);