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

Device address fro public device address format

Hi In current Desktop 2 project, We know that software device stack takes 48-bit random device address from FICR registers (DEVICEADDR[1: 0]) for BTLE. Each nRF51 has unigue address. We are planning to apply public device address (compny_assigned + company_id) from IEEE. How can we replace FICR device address by it in nRF51? Then, no side effect at all.

Parents
  • Dear Ole Morten Although I didn't define addr_type in the last reply, I did try adding the addr_type in my source code. It still failed. You said I have 0-byte in the address. Could you guide me more detailed? How shall I modify the souce code?

  • I'm sorry for the confusion, but I was mistaken. You are allowed to have a 0-byte in your address, as long as not all bytes are 0. You do however have to set the two most significant bits in the address, as required by the Core specification, volume 3, part C, section 10.8. The following therefore works: addr.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC; addr.addr[0] = 0x01; addr.addr[1] = 0x02; addr.addr[2] = 0x03; addr.addr[3] = 0x04; addr.addr[4] = 0x05; addr.addr[5] = 0x06 | 0xc0;

    err_code = sd_ble_gap_address_set(&addr); APP_ERROR_CHECK(err_code);

Reply
  • I'm sorry for the confusion, but I was mistaken. You are allowed to have a 0-byte in your address, as long as not all bytes are 0. You do however have to set the two most significant bits in the address, as required by the Core specification, volume 3, part C, section 10.8. The following therefore works: addr.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC; addr.addr[0] = 0x01; addr.addr[1] = 0x02; addr.addr[2] = 0x03; addr.addr[3] = 0x04; addr.addr[4] = 0x05; addr.addr[5] = 0x06 | 0xc0;

    err_code = sd_ble_gap_address_set(&addr); APP_ERROR_CHECK(err_code);

Children
No Data
Related