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

Why is the whitelist set to NULL?

I am looking at the ble_app_hrs_c example (with the s130 soft device on pca10028 dev board). I have set the m_scan_mode to BLE_WHITELIST_SCAN to enable whitelisting. In the "on_ble_eve" function just before it connects, it sets the "p_whitelist" variable to NULL. The description of that variable in the documentation says:

"Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used."

And the documentation for the fuction "sd_ble_gap_connect" says:

"To use the currently active whitelist set p_scan_params->p_whitelist to NULL."

I see that to use whitelisting you need to set this to NULL. Wouldn't you want it always pointing to a whitelist if you are trying to use a whitelist? How is setting that pointer to NULL useful?

Related