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

MAC Address for BLE Communication

Hi,

I'm trying send me the mac address of the device by UART by the following method:

void sendMacAddress(void){
  uint8_t packet[6];
  packet[0] = NRF_FICR->DEVICEADDR[0];
  packet[1] = NRF_FICR->DEVICEADDR[0]>>8;
  packet[2] = NRF_FICR->DEVICEADDR[0]>>16;
  packet[3] = NRF_FICR->DEVICEADDR[0]>>24;
  packet[4] = NRF_FICR->DEVICEADDR[1];
  packet[5] = NRF_FICR->DEVICEADDR[1]>>8;
  transmit_string_CR("Start",5);
  for(int i=5; i>=0; --i){
    char msg[2]={0};
    itoa(packet[i],msg,16);
    transmit_string_NCR(msg,2);
    if(i!=0)transmit_string_NCR(":",1);
  }
  CR();
  nrf_delay_ms(1000);
}

By serial I receive: 

Start
b9:24:82:d5:4f:81

The problem its that the device which I receive is not the same that appears in the stick device, I attach photo:

Could anyone tell me that I'm do it correctly?

Best,

Jorge.

Related