Hello, I am using the examples\ble_central\ble_app_hrs_c project from SDK_8.1.0 with s120_nrf_2.0.0 on an nRF51422_CEAAB00. This when the variable m_scan_mode set to BLE_FAST_SCAN, the code receives advertisements from and can connect to different heart monitors. When m_scan_mode is set to BLE_WHITELIST_SCAN, the code does not receive any advertisements. I have checked the whitelist, and my devices are present. For selective scanning the code sets the parameters to:
m_scan_param.active = 0; // Active scanning set.
m_scan_param.selective = 1; // Selective scanning not set.
m_scan_param.interval = SCAN_INTERVAL;// Scan interval.
m_scan_param.window = SCAN_WINDOW; // Scan window.
m_scan_param.p_whitelist = &whitelist; // Provide whitelist.
m_scan_param.timeout = 0x001E; // 30 seconds timeout.
I ran this sample code as a sanity check because my application has the same issue.
m_scan_param.active = 0; m_scan_param.selective = 0; // works
m_scan_param.active = 1; m_scan_param.selective = 0; // works
m_scan_param.active = 0; m_scan_param.selective = 1; // does not return any advertisements
m_scan_param.active = 1; m_scan_param.selective = 1; // does not return any advertisements
It may also be of interest that when m_scan_param.selective = 1; a whitelist must be provided or a NRF_ERROR_INVALID_ADDR is returned.
Please tell me what I am missing. Thank you.