<?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>Mac address in whitelist</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84160/mac-address-in-whitelist</link><description>Hello everyone 
 Currently I am developing the code for a gateway that collects data from various BLE devices. Some of the peripherals go onto pairing process, meaning that its bonding information will be stored in the whitelist for further connections;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Feb 2022 09:00:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84160/mac-address-in-whitelist" /><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/351703?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 09:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6887a273-aab8-4b9f-b2e1-4ed68509c3a1</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;You are welcome. Yes, Let us know your result. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/351648?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 21:36:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efb18d4a-1008-4f90-bad5-515c9df102b7</guid><dc:creator>Daniela_A</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your suggestion. I will test it and see what happens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/350786?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 08:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5a422e2-df1d-40ba-a0fe-ac066a72cd59</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Daniela,&lt;/p&gt;
&lt;p&gt;I talked to our team. Peer count is an input parameter to the &lt;strong&gt;pm_whitelst_set()&lt;/strong&gt; function, not an output. You can use &lt;strong&gt;pm_peer_count()&lt;/strong&gt; to get the number of bonds on the device. Then you can check if the count gets incremented after adding the new peer device.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643789075827v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/350533?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 21:29:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3ec66b9-ebad-4050-b08c-c8e38fe6b29c</guid><dc:creator>Daniela_A</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;br /&gt;&lt;br /&gt;I was able to add the MAC addresses using &lt;strong&gt;sd_ble_gap_whitelist_set() &lt;/strong&gt;successfully. The peers are recognized and the central proceeds to establish a connection.&lt;br /&gt;&lt;br /&gt; However, I would like the addresses to be written in the flash with the others using the peer manager. I am using parts of the code someone else wrote here in this &lt;a title="forum" href="https://devzone.nordicsemi.com/f/nordic-q-a/50297/creating-whitelist-with-pm-on-manually-added-peer-error-0x12802-ble_error_gap_invalid_ble_addr"&gt;forum&lt;/a&gt;. I successfully add the address using pm_peer_new(); however, when I want to set the whitelist using pm_whitelist_set(), it is not working because it says that the peer count = 0.&lt;br /&gt;&lt;br /&gt;PS: I am using the code shown in the answer that contains the solution&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/350268?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 15:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf5767f5-6a9e-4614-a9a6-1144eeea01dd</guid><dc:creator>Daniela_A</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;br /&gt;&lt;br /&gt;Thanks for&amp;nbsp; your support. I will try implementing that and if I have any issues, I will let you know.&lt;br /&gt;&lt;br /&gt;Good day&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mac address in whitelist</title><link>https://devzone.nordicsemi.com/thread/350241?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 14:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c69d805e-a15e-4918-ab41-ea7af2d954df</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Daniela,&lt;/p&gt;
&lt;p&gt;It is possible as long as the peripheral uses a static address type. You can populate the whitelist in the application. However, there are no examples for it. The SDK examples populates the whitelist via the peer manager which gets the information from the bond table.&lt;/p&gt;
&lt;p&gt;The softdevice calls for updating the whitelist and it is done by&amp;nbsp;&lt;strong&gt;sd_ble_gap_whitelist_set()&lt;/strong&gt; function (&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_9_2_1_2_34#gacdd2dd570000368dd5c29d799c198779"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_9_2_1_2_34#gacdd2dd570000368dd5c29d799c198779&lt;/a&gt;&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643379016466v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;pp_wl_addrs:&lt;/strong&gt; Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;len:&lt;/strong&gt; Length of the whitelist, maximum length is defined by BLE_GAP_WHITELIST_ADDR_MAX_COUNT&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This function sets the active whitelist in the SoftDevice. The things to be noted;- Only one whitelist can be used at a time and the whitelist is shared between the BLE roles. The whitelist can not be set if a BLE role is using the whitelist. If an address is resolved using the information in the device identity list, then the whitelist filter policy applies to the peer identity address and not the resolvable address sent on air.&lt;/p&gt;
&lt;p&gt;You can look at the id_manager.c::im_whitelist_set() function to see how the function is used by the peer manager.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Fell free to ask if you have further queries.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have a nice weekend.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>