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

About whitelist scan filtering

Hi Nordic,

I am using SDK 12.3.0, S130 2.0.1 and PCA10028 nrf51 DK.

I would like to ask about whitelist scan filtering.

After pairing and bonding, central would perform whitelist scan if it is disconnected. I would like to ask if central would still have BLE_GAP_EVT_ADV_REPORT event and I would like to add some filtering even some peripherals are in whitelist.

Thanks.

  • Hello,

    If I understand your question right, you are already using whitelist in your scanning, right? Probably like it is done in the ble_app_hrs_c example from SDK12.3.0.

    If you for some reason want to scan without the whitelist, to pick up more devices, it is possible to disable the whitelist, like it also is done in the ble_app_hrs_c example.

    If you look in main.c on this example (found in SDK12.3.0\examples\ble_central\ble_app_hrs_c) in the bsp_event_handler, you have the event:

    case BSP_EVENT_WHITELIST_OFF: 

    which will disable the whitelist. It simply sets m_whitelist_disabled = true, and then starts scanning using scan_start();

    in scan_start() it checks:

    if (((addr_cnt == 0) && (irk_cnt == 0)) || (m_whitelist_disabled))

    and if m_whitelist_disabled == true it will set m_scan_param.use_whitelist = 0 and m_scan_param.adv_dir_report = 0, and thus, it will disable the whitelist.

    Is this something that you can use?

    Best regards,

    Edvin

Related