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

Whitelist filter policy

My setup is NRF52DK+SD132_V3.1.0+SDK_12.2.0.

While playing with my peripheral I setup a whitelist, the default whitelist filter policy seems to be BLE_GAP_ADV_FP_FILTER_CONNREQ (I made that conclusion because NOT whitelisted centrals are able to send scan request and successfully get scan response but they are unable to connect).

Now I want to change the filter to a different value, say BLE_GAP_ADV_FP_FILTER_SCANREQ, while searching forums and documentation it seems like right way to achieve that is to leverage sd_ble_gap_adv_start but I am already leveraging another function to setup advertising - ble_advertising_init but this function doesn't seem to provide an option to set/change the filter policy. Is that OK/by design to use both of them ? If so, isn't it a little bit confusing because, as I understand, once any of them completes the advertising is technically up an running.

Parents
  • I recommend chosing one of the above, not a mix of them. Not use library while at the same time calling sd_ble_gap_adv_start() directly. In general you have more control if you use the SoftDevice functions directly, but you may have to use more time understanding what they do, instead of letting the library handle everything for you. I don't know what the right choice is for you. The SoftDevice is implemented according to the Bluetooth specification, with all mandatory features. If is qualified by the Bluetooth SIG to ensure interoperability with other vendors. It is not open source. You cannot change it. The SDK is developed to ease the use of the SoftDevice, and implements functionality that not everyone needs, like for example bond management, or an advertising management.

Reply
  • I recommend chosing one of the above, not a mix of them. Not use library while at the same time calling sd_ble_gap_adv_start() directly. In general you have more control if you use the SoftDevice functions directly, but you may have to use more time understanding what they do, instead of letting the library handle everything for you. I don't know what the right choice is for you. The SoftDevice is implemented according to the Bluetooth specification, with all mandatory features. If is qualified by the Bluetooth SIG to ensure interoperability with other vendors. It is not open source. You cannot change it. The SDK is developed to ease the use of the SoftDevice, and implements functionality that not everyone needs, like for example bond management, or an advertising management.

Children
Related