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

Whitelist advertising with several devices

Dear Nordic Team

I am developing a BLE device using the following resources:

- Microcontroller: nRF52832

- Softdevice s132

- Peer Manager is used for whitelist advertising

My maximum number of whitelisted peers is 3, and I can see that the device addresses are saved correctly in the whitelist. The problem is that only the connection request from the first central device are accepted, and I am not able to reconnect after bonding with the 2nd or the 3rd device. I paste some parts of my code below, in case it helps:

void hw_passWhitelistOrPreventAdvertising() {
ret_code_t err_code_1, err_code_2;
ble_gap_irk_t whitelist_irks[MAX_NUMBER_OF_WHITELISTED_PEERS] = {};
ble_gap_addr_t whitelist_addrs = {};
ble_gap_addr_t *p_whitelist_addr[1];
uint32_t irk_cnt = MAX_NUMBER_OF_WHITELISTED_PEERS;
uint32_t addr_cnt = MAX_NUMBER_OF_WHITELISTED_PEERS;

err_code_1 = pm_whitelist_get(&whitelist_addrs, &addr_cnt, whitelist_irks, &irk_cnt);
p_whitelist_addr[0] = &whitelist_addrs;
err_code_2 = ble_advertising_whitelist_reply(p_whitelist_addr[0], addr_cnt, whitelist_irks, irk_cnt);
if(err_code_1 != NRF_SUCCESS || err_code_2 != NRF_SUCCESS || addr_cnt == 0 || irk_cnt == 0) {
if(ble_advertising_start(BLE_ADV_MODE_IDLE) != NRF_SUCCESS) {
LOG_INFO("Preventing advertising without whitelist didn's succeed!");
}
}

Questions:

- Do you have any suggestion about what could be happening?

- Can you please send me any guidelines to implement whitelist advertising using more than one device and the peer manager?

Unfortunately I cannot find any documentation available about it.

Thanks in advance.

Parents Reply Children
No Data
Related