Master node Scaning with White List

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello, Is there an example showing how to use a white list when a master node is scanning?   I saw a post How to add and remove peripherals from White List but it is for sensor (slave) nodes.   Thank you.

0 Likes
1 Solution
Anonymous
Not applicable

Hello Huang,

Using the white list is the same as with the Master.

In hello_client:

Change this

//blecen_cen_cfg.scan_filter_policy = HCIULP_SCAN_FILTER_POLICY_WHITE_LIST_NOT_USED;

to this

blecen_cen_cfg.scan_filter_policy = HCIULP_SCAN_FILTER_POLICY_WHITE_LIST_USED;

Then you can set up the example used in the BLOG mentioned above.

Thanks,

JT

View solution in original post

6 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

abuch's blog: How to add and remove peripherals from White List

Shows how to add/remove peripherals to the White List running on a Central.

You are looking for a means to add/remove Central devices to/from a white list running on a peripheral.

Correct?

0 Likes
Anonymous
Not applicable

The blog post above is about adding the white list (a list of master nodes) to a peripherals.

I am looking for how to use the white list (a list of slaves nodes) for a master node, so when the master node scans the channels, it will ignore the slave nodes that is not in the list.  Thanks.

0 Likes

Thanks for correcting me.  The title of the blog apparently needs to be changed as its implied meaning is my understanding below (what you are actually asking for).

I will change this now. We will need to talk to the developers about what's needed to reverse roles.

abuch

Anonymous
Not applicable

Hello Huang,

Using the white list is the same as with the Master.

In hello_client:

Change this

//blecen_cen_cfg.scan_filter_policy = HCIULP_SCAN_FILTER_POLICY_WHITE_LIST_NOT_USED;

to this

blecen_cen_cfg.scan_filter_policy = HCIULP_SCAN_FILTER_POLICY_WHITE_LIST_USED;

Then you can set up the example used in the BLOG mentioned above.

Thanks,

JT

Anonymous
Not applicable

Thanks j.t

It works when I add only one address using blecm_SelectAddress.  However, when I add the second address, it will replace the first address.  Is it possible to have multiple address in the whitelist?

0 Likes
Anonymous
Not applicable

Answer my own question.  One can specify the number of address in blecm_SelectAddress(address pointer, number of address).  Maximum number is 5.