Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a provision in SDK to filter advertising packets based on public address

I am creating a BLE beacon scanner, using nRF51822 and SDK 12.0.0. My beacons will be using public addresses so the upper 3-bytes of device addresses of all my devises will be identical. Whenever an advertising packet is received, my application layer gets a call back with BLE_GAP_EVT_ADV_REPORT. It would be great if the SDK is able to filter out packets that I am not interested in and I should receive callback only when my beacons are nearby. Is there any such facility available in SDK 12.0.0 or later?

Parents
  • Hi, 

    If you know your exact address of your device, you can setup a whitelist before you start scanning. Please have a look at scan_start() function in ble_app_hrs_c for an example. 

    If you have multiple devices that only share upper 3 bytes that you want to scan. You might not be able to use whitelist, but you can do filtering when you receive BLE_GAP_EVT_ADV_REPORT event. The address is inside p_gap_evt->params.adv_report. Please have a look at that event inside on_ble_evt() in main.c in the same ble_app_hrs_c 

    There is no way to tell the softdevice to filter out only 3 first bytes. You need to it in your application. 

  • Its just a suggestion... I think such a facility should be available in SDK because when I use public address,the upper 3-bytes will be my company ID which I buy from IEEE. Its an easy way of filtering out advertising packets and identifying my devices.

Reply Children
No Data
Related