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

How to change mac in nRF52?

SDK13. S132. I try to change mac by:

void set_addr (void) 

{

static ble_gap_addr_t m_central_addr;

m_central_addr.addr_type     = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;
m_central_addr.addr[0] = 0xfd;
m_central_addr.addr[1] = 0x71;
m_central_addr.addr[2] = 0x5f;
m_central_addr.addr[3] = 0x45;
m_central_addr.addr[4] = 0x2b;
m_central_addr.addr[5] = 0x46; // 2MSB must be set 11

sd_ble_gap_addr_set(&m_central_addr);

}

But no result success. When I should call this function? Before which?

Related