Hi,
Is it possible to add a static bluetooth address to the whitelist?
I am using SDK 14.2.0, device is nrf52832 + peer manager.
BR
bjarke
Hi,
Is it possible to add a static bluetooth address to the whitelist?
I am using SDK 14.2.0, device is nrf52832 + peer manager.
BR
bjarke
Hi,
Whitelist can be used both by peripheral (to filter which centrals can connect) and by central (to filter what peripherals to connect to.) I assume that you need this for a peripheral.
If you use the Advertising Module then it is your responsibility to provide a whitelist on the BLE_ADV_EVT_WHITELIST_REQUEST event.
You may then choose to fetch a whitelist from peer manager using pm_whitelist_get(), as is done for instance in the HID Mouse Application example.
Or, in your case, you may make a whitelist manually using any Bluetooth addresses that you would like. The whitelist is an array of ble_gap_addr_t structures and an array of ble_gap_irk_t structures. (The IRK structure is only needed for resolvable addresses, not for static ones.)
In any case you must reply to the whitelist request event with a call to ble_advertising_whitelist_reply(), where you provide the whitelist.
Regards,
Terje
Hi again,
Look at similar problem
https://devzone.nordicsemi.com/f/nordic-q-a/18463/setting-up-whitelist-in-sdk-v12-2-0
I tried to reproduce...
If I use
ble_gap_addr_t whitelist_addr = {1, BLE_GAP_ADDR_TYPE_PUBLIC, {0x8d,0xaa,0xa4,0x2d,0x65,0x94}}; const ble_gap_addr_t *p_whitelist_addr[] = {&whitelist_addr}; err_code = sd_ble_gap_whitelist_set(p_whitelist_addr, 1); APP_ERROR_CHECK(err_code); err_code = ble_advertising_whitelist_reply(&m_advertising, p_whitelist_addr[0], 1, NULL, 0);
I do get fast advertising with whitelist, but somehow the address?(I suppose) is wrong, cause I cannot connect.
Changing p_whitelist_addr[0] to NULL does not do anything.
BR
bjarke
Hi again,
Look at similar problem
https://devzone.nordicsemi.com/f/nordic-q-a/18463/setting-up-whitelist-in-sdk-v12-2-0
I tried to reproduce...
If I use
ble_gap_addr_t whitelist_addr = {1, BLE_GAP_ADDR_TYPE_PUBLIC, {0x8d,0xaa,0xa4,0x2d,0x65,0x94}}; const ble_gap_addr_t *p_whitelist_addr[] = {&whitelist_addr}; err_code = sd_ble_gap_whitelist_set(p_whitelist_addr, 1); APP_ERROR_CHECK(err_code); err_code = ble_advertising_whitelist_reply(&m_advertising, p_whitelist_addr[0], 1, NULL, 0);
I do get fast advertising with whitelist, but somehow the address?(I suppose) is wrong, cause I cannot connect.
Changing p_whitelist_addr[0] to NULL does not do anything.
BR
bjarke