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

When is the correct time to create a whitelist?

The examples of whitelisting that I am looking at (ble_app_proximity, ble_app_hrs_c) both create their whitelists just before a scan. I am wondering if this is actually the correct use of a whitelist or it it is just a shortcut used to quickly make an example? I feel that a whitelist should not be created every time you do a scan.

I am using SDK 11, with soft device 130.

Parents
  • Hi,

    The examples use dm_whitelist_create(), which builds a whitelist from the list of bonded devices excluding the currently connected devices. When using this function to build the whitelist it makes sense doing it each time starting scan.

    There might be other ways to do it depending on the needs of your application. If you only have one connection at any given time or if you use other methods to build the whitelist it may be better for instance to build the whitelist once and reuse it every time.

    Regards, Terje

Reply
  • Hi,

    The examples use dm_whitelist_create(), which builds a whitelist from the list of bonded devices excluding the currently connected devices. When using this function to build the whitelist it makes sense doing it each time starting scan.

    There might be other ways to do it depending on the needs of your application. If you only have one connection at any given time or if you use other methods to build the whitelist it may be better for instance to build the whitelist once and reuse it every time.

    Regards, Terje

Children
Related