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

Adding IRK to whitelist

I have enabled the whitelist feature based on the ble_hids_keyboard example, but when I load the application it is not advertising anywhere. It is paired with my iPhone, but it is still not advertising. How do you add the irk to the whitelist and then use it to advertise to those devices on the whitelist only?

  • I think you are using S130 2.0.0-7.alpha, together with SDK 11.0.0-2.alpha. I would recommend using S130 2.0.0, since this is a production release. Use this with SDK 11.0.0. It is available here. Under nRF5_SDK.

    I was not able to compile your project, let me try to help you before I give your project another go. What do you mean by they are not added to the whitelist? Are you getting the BLE_ADV_EVT_WHITELIST_REQUEST event? Does dm_whitelist_create() create a whitelist for you?

  • I am not sure if the whitelist is being created. It still advertises without the whitelist, so I am assuming it doesn't think the whitelist is populated.

  • Also, correct me if I am wrong, but if you erase the entire board and re-program the soft device and bootloader the bonds are deleted right? So the first time you connect after that it is not advertising using the whitelist. Once you connect and bond, it then begins using the whitelist? If you want to add multiple devices to the whitelist you should disable it, bond with all the correct devices, and then enable the whitelist again. Is that a correct understanding? Because sometimes I feel like the whitelist is working so I erase the board and try to reconnect and rebond to see if it will work again but it doesn't.

  • Actually I think I figured out how to get it working. But if you could answer the second question that would be helpful. Thanks!

  • FormerMember
    0 FormerMember

    It is not possible to advertise to the devices in the whitelist only. When adding device to a whitelist, advertising will be normal, but the advertising device will only accept connect requests from the devices in the whitelist. If you want to advertise towards specific devices, you will have to use directed advertising. With directed advertising, you will only be able advertise towards one device at the time and only towards devices that don't change their address (devices with another address type than private resolvable).

Related