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?

Related