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

DFU Device Address Changes

When my Nordic device is running my custom BLE application I notice that the device address is 0xC4318DBD687C. When device is running the bootloader service the device address becomes 0xC4318DBD687D. I am not changing the address of the device during boot. The static_random address found in the FICR device_addr is the one that should be used. Why is it changing? I was under the impression it was a fixed random number generated during production of the chip.

Lucas

Parents
  • @Lucas: By design our Bootloader will use a different address from the default address in FICR (FICR address + 1) if there is no bond information shared. Please have a look at dfu_transport_update_start() in dfu_transport_ble.c

    The reason we do that is to solve the issue that the central device (phones, tablets) may try to use the bond information it has before with the normal application to encrypt the link. If we don't have shared bondinformation, we won't be able to follow the encrypted link when in bootloader mode. So we change the address and will be recognize as a new device from the phone and can avoid the above issue.

    EDIT: It's not only when there is bond information share but also when a central address is shared, the address will not change. It only changes when the bootloader started up from booting (no bond information or address shared)

  • @ Jordan: If you use SDK v9.0 you can find this code:

    ble_gap_addr_t addr;
    
            err_code = sd_ble_gap_address_get(&addr);
            APP_ERROR_CHECK(err_code);
    
            // Increase the BLE address by one when advertising openly.
            addr.addr[0] += 1;
    
            err_code = sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &addr);
            APP_ERROR_CHECK(err_code);
    

    From line 1065 to 1074 in dfu_transport_ble.c

Reply Children
No Data
Related