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

public static ble address

Hi,

We bought a mac bd addr pool from IEEE Where is the best way to store this mac adress during production ? We guess the type will be: BLE_GAP_ADDR_TYPE_PUBLIC

Do you have example for the init with public adress ? Is there any drawback of using static public address except security ?

Thanks

  • Hi energy,

    You can store the address anywhere in the flash or in UICR region (there are CUSTOMER[xx] bytes available). However you will need to set the address manually through sd_ble_gap_adddress_set call (if you use Nordic Soft Device) e.g. like this:

    // Local variables
    uint32_t       err_code;
    ble_gap_addr_t ble_gap_addr;
    
    // ...
    
    ble_gap_addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
    memcpy((uint8_t *)ble_gap_addr.addr, (uint8_t *)(NRF_UICR + 0x0080), BLE_GAP_ADDR_LEN);
    err_code = sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &ble_gap_addr);
    APP_ERROR_CHECK(err_code);
    

    I don't see any problem in using Public static address except privacy concerns. Cheers Jan

Related