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

How to get 6 byte mac address at nrf51822

When I scan BLE device at nRF UARTv2.0 App in Android4.4, it is appar device name(Ex:Nordic_UART) and 6 byte device address(MAC address?). I want to include mac address in device name. How to get 6 byte mac address at nrf51822?

Parents
  • Thanks for your help. I succecced it.

    char strDeviceName[20]; void device_name_set(void) { int no; no = NRF_FICR->DEVICEADDR0%100000; sprintf(&strDeviceName[0], "%s%05d\0", &DEVICE_NAME[0], no);

    }

    static void gap_params_init(void) { ... device_name_set(); err_code = sd_ble_gap_device_name_set(&sec_mode, (uint8_t *) strDeviceName, strlen(strDeviceName)); ... }

    Good day.

Reply
  • Thanks for your help. I succecced it.

    char strDeviceName[20]; void device_name_set(void) { int no; no = NRF_FICR->DEVICEADDR0%100000; sprintf(&strDeviceName[0], "%s%05d\0", &DEVICE_NAME[0], no);

    }

    static void gap_params_init(void) { ... device_name_set(); err_code = sd_ble_gap_device_name_set(&sec_mode, (uint8_t *) strDeviceName, strlen(strDeviceName)); ... }

    Good day.

Children
No Data
Related