Using Scan Filter in nRF connect SDK v2.5.1

I am using nRF Connect SDK v2.5.1 and nRF5340 DK for the development.

With ble scanner app, i am trying to filter for only the devices i am interested in.

Using bt_scan_filter_add(..) and bt_scan_filter_enable(..) to accomplish this. And it works.

while doing this, came across few posts that talk about filters and whitelisting like Scan with whitelist vs. scan filtering 

As those are pretty old, wanted to check if we have any latest document that describes how filtering in current version works, design or something like that, would help!

Also I can understand that whitelisting can be only done in soft device sdk, I would like to know how efficient is using the filter API's in nRF connect SDk ? 

  • Hello,

    The Bluetooth specification has renamed 'whitelist' to 'filter accept list', so you should get more relevant hits if you search for 'filter accept list'. The 'Bluetooth: Peripheral Accept List' sample demonstrates how you can enable this filtering in the peripheral. The principle of maintaining the filter accept list with known peer devices also applies to the central role. 

    The filter accept list operates by filtering devices based on their address ID at the link layer. However, as many devices today use a private resolvable address, you need to include the identity resolving key (IRK) in the list to identify known devices, and the IRK is only distributed during bonding. So, this often prevents the feature from being used in a pure observer role.

    https://btprodspecificationrefs.blob.core.windows.net/language-mapping/Appropriate_Language_Mapping_Table.pdf 

    Relevant forum thread:  bt_le_filter_accept_list_add error, and possible population from prj.conf  

    Best regards,

    Vidar

  • Thanks for your response.

    In the link I gave you, you will see this

    " When you set a whitelist in the SoftDevice for a scanning device, the SoftDevice will perform filtering on the incoming advertising packets, and forward those packets that passes the filtering to the application. Thus, you will only see the advertising packets from addresses in the whitelist."

    In the case of softdevice it looks application would receive only the filtered packets. but where as in case of "filter accept list" it looks app would receive all packets and performs filter. Is that right ?

    I am curious, does both of this approach has any difference in terms of performance (like discovery rate.. etc)?

    My requirement for DK is to play a pure observer role. Currently I am seeing a discovery rate of around ~80%. While doing some research to increase this discovery rate, came across softdevice but this looks like separate stack which is not open source. if you have any insight around this, please share!

    Regards,

    -Simbu

  • filter accept list/whitelist is a feature defined by the Bluetooth specification so it should work the same way across different BT stack implementations. This is true for the Softdevice (Bluetooth stack used in the nRF5 SDK) and the Bluetooth stack used in the nRF Connect SDK.

    When scanning with a filter accept list, you will only receive advertisements from devices that have been added to the list. This means the application will need to process fewer advertisement packets.

    Regards,

    Vidar

Related