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

how to set ble gap address type to RANDOM_PRIVATE_RESOLVABLE

I want to change the ble gap address type to RANDOM_PRIVATE_RESOLVABLE. In gap_params_init(), I add these line at the end of the function

ble_gap_addr_t *p_gap_address;
err_code = sd_ble_gap_addr_get(p_gap_address);
APP_ERROR_CHECK(err_code);
p_gap_address->addr_type = BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE;
err_code = sd_ble_gap_addr_set(p_gap_address);
APP_ERROR_CHECK(err_code);

The code is based on ble_app_template. No error or warning, but it does not work. what should I do?

Parents Reply
  • Do I really have to use sd_ble_gap_privacy_set if I want to use BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE? Or can I keep my code that works with version v2 by simply changing the GAP address myself using sd_ble_gap_addr_set?


    I have just implemented a multi advertiser that can broadcast using different addresses, but no it seems like this functionality has been modified and this is no longer possible :-( Any workarounds? This was the only sensible method for broadcasting multiple messages,...

Children
No Data
Related