<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103863/can-i-using-whitelist-and-filter-at-the-same-time</link><description>I need using whitelist and filter at the same time in my project.I want to add all advertising to whitelist that allowed by filter. 
 While I set p_scan_ctx-&amp;gt;scan_params.filter_policy == BLE_GAP_SCAN_FP_WHITELIST,the central can not to using the filter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Sep 2023 15:56:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103863/can-i-using-whitelist-and-filter-at-the-same-time" /><item><title>RE: Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/thread/447132?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 15:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e71e0d70-ae50-413c-a6fd-c473460c74d0</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Chaoyue Ying,&lt;br /&gt;&lt;br /&gt;The issue could indeed be with your code here. Could you perhaps share the code in question here, so that I may take a look?&lt;br /&gt;You can use the&amp;nbsp;&lt;em&gt;Insert -&amp;gt; Code&amp;nbsp;&lt;/em&gt;option to share code here on DevZone.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="Chaoyue Ying"]Because, there not only one&amp;nbsp;peripheral&amp;nbsp;&lt;span&gt;around a node(central) and maybe new&amp;nbsp;peripheral will add to the node.To the central ,&amp;nbsp;each addr is unknown.So I want to use the whitelist to keep connection to old devices(because maybe disconnect happened in sometimes) and use the filter to find new devices.&lt;/span&gt;[/quote]
&lt;p&gt;Will you here ever be in a situation where you are connected to more than 1 peer at the same time? That is to say, is your intention to keep scanning after you find the first peripheral device, in case there is a similar device present that you would like to connect to (and add to the whitelist for later use) also?&lt;br /&gt;Is there a particular reason why you would like to uyse whitelist at all for this, if there always is a chance for additional peer devices appearing to your central?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/thread/446999?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 08:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce67b70-c86b-44d1-a7e8-bf3a55e370c5</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;About &lt;span&gt;the whitelist and the filter both not working,I checked my code.I think it because&amp;nbsp;I add the case that&amp;nbsp;p_scan_ctx-&amp;gt;scan_params.filter_policy == BLE_GAP_SCAN_FP_ACCEPT_ALL to&amp;nbsp;is_whitelist_used() to return NRF_SUCCESS.Therefore,the filter is not working and&amp;nbsp;I do nothing while scaner listen to&amp;nbsp;NRF_BLE_SCAN_EVT_WHITELIST_ADV_REPORT and output nothing to RTT.So it feel like the central work abnormally.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think it can not to resolve my problem that&amp;nbsp;&lt;span&gt;enable the whitelist after the first device has been added.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Because, there not only one&amp;nbsp;peripheral&amp;nbsp;&lt;span class="skip"&gt;around a node(central) and maybe new&amp;nbsp;peripheral will add to the node.To the central ,&amp;nbsp;each addr is unknown.So I want to use the whitelist to keep connection to old devices(because maybe disconnect happened in sometimes) and use the filter to find new devices.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span class="skip"&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Chaoyue Ying&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/thread/446792?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2023 07:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a21ee2-5e6d-4699-8cef-1499f9cf77b3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Chaoyue Ying"]I want to scan devices near and check them uuid.If the uuid match the scan ilter,Iwill connect with them and add them to whitelist.And while whitelist is not NULL,I still want to scan and add devices with the&amp;nbsp; uuid to whitelist.[/quote]
&lt;p&gt;So in essence, you would like to keep scanning with the filters until a match is found, and then add that match to the whitelist. Then, you would just like to use the whitelist thereafter, is this correct?&lt;br /&gt;If so, you would just need to enable the whitelist after the first device has been added.&lt;br /&gt;How are you doing this in your code?&lt;/p&gt;
[quote user="Chaoyue Ying"]About theproblem that&amp;nbsp;&amp;nbsp;the central seems to work abnormally, it see like the whitelist and the filter both not working.[/quote]
&lt;p&gt;Please elaborate thoroughly on this, so that I may best advice you on how to return the device to the expected behavior.&lt;br /&gt;Did you have them each working as expected separately, but when enabling them both your are seeing neither of them work?&lt;br /&gt;Could you show the code in which you did this, or the code change that lead to it stop working?&lt;br /&gt;Is the device working as expected with the exception of the scan filter and whitelist?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/thread/446748?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2023 00:52:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9b424fb-04ea-4126-82aa-6e05c82a2cab</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;&lt;span&gt;I want to scan devices near and check them uuid.If the uuid match the scan ilter,Iwill connect with them and add them to whitelist.And while whitelist is not NULL,I still want to scan and add devices with the&amp;nbsp; uuid to whitelist.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;About theproblem that&amp;nbsp;&amp;nbsp;the central seems to work abnormally, it see like the whitelist and the filter both not working.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I using whitelist and filter at the same time</title><link>https://devzone.nordicsemi.com/thread/446487?ContentTypeID=1</link><pubDate>Mon, 18 Sep 2023 14:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30371bfa-70d1-49d8-ad32-af879a018a89</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I need&amp;nbsp;using whitelist and filter at the same time in my project.I want to add all&amp;nbsp;advertising to&amp;nbsp;&lt;span&gt;whitelist that allowed by filter.&lt;/span&gt;[/quote]
&lt;p&gt;I am not sure if I quite understand your intentions here, could you elaborate on your use-case, and requirements and contstraints?&lt;br /&gt;The Scan filters are used when you would like to connect to devices that advertise a certain payload, while the whitelist is used when you only want to receive packets from specific devices (based on ID).&lt;br /&gt;As soon as you enable the whitelist your filters will be obsolete because you will only see advertisements from the devices in your whitelist - unless you intend to conditionally connect to some of these devices based on their advertising payload?&lt;br /&gt;&lt;br /&gt;Please also elaborate what you mean when you say that the central seems to work abnormally.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>