<?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>Whitelisting one device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43640/whitelisting-one-device</link><description>I&amp;#39;d like to apply bonding/whitelist so that once a peripheral device connects to a central, only that peripheral device can reconnect (until bonding/whitelist is cleared via button). 
 So far, I just have a central and peripheral app automatically pairing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Mar 2019 09:56:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43640/whitelisting-one-device" /><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/173649?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 09:56:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9105598b-8437-4870-b033-f3ab27d673ee</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Nice observation. It seems like a fault to me. I will ask internally and get back to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/173212?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 11:37:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5acd1ae-94ea-4c13-80b4-d1d7ca854769</guid><dc:creator>2gav</dc:creator><description>&lt;p&gt;Hello Simon.&lt;/p&gt;
&lt;p&gt;Sorry for getting into your dialogue, but I have a comment in the subject.&lt;/p&gt;
&lt;p&gt;SDK 15.2,&amp;nbsp;id_manager.c,&amp;nbsp;im_whitelist_set:&lt;/p&gt;
&lt;p&gt;uint32_t wlist_addr_cnt = 0;&lt;/p&gt;
&lt;p&gt;and this init to 0 (zero) cause in&amp;nbsp;peers_id_keys_get stop on breakpoint at:&lt;/p&gt;
&lt;p&gt;NRF_PM_DEBUG_CHECK((*p_addr_cnt) &amp;gt;= peer_cnt);&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/173188?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 09:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bd48c91-d0f8-4120-9854-e7226207c205</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Take a look at the ble_app_hids_keyboard example, it shows&amp;nbsp;how you can limit the whitelist to 1 without editing the&amp;nbsp;BLE_GAP_WHITELIST_ADDR_MAX_COUNT definition in the shared BLE library &lt;em&gt;ble_gap.h&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;When you call&amp;nbsp;&lt;em&gt;pm_whitelist_set(..), &lt;/em&gt;you provide the max size of the whitelist as&amp;nbsp;the second argument, and this will eventually decide the size of the whitelist. The call will eventually end up in&amp;nbsp;&lt;em&gt;sd_ble_gap_whitelist_set(..), &lt;/em&gt;and the size provided with the first function will be sent in as an argument here and decide the length of the whitelist.&lt;/p&gt;
&lt;p&gt;However, the value of&amp;nbsp;BLE_GAP_WHITELIST_ADDR_MAX_COUNT in ble_gap.h will matter. E.g. if you set&amp;nbsp;BLE_GAP_WHITELIST_ADDR_MAX_COUNT to 2 in ble_gap.h, and call with a whitelist of size 5 (&lt;em&gt;pm_whitelist_set(peer_ids, 5)&lt;/em&gt;) you will get an error.&lt;/p&gt;
&lt;p&gt;The same logic applies to&amp;nbsp;&lt;em&gt;pm_whitelist_get(..).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/172623?ContentTypeID=1</link><pubDate>Sat, 23 Feb 2019 18:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc2a51ff-c6d6-4e3b-bec3-8511f86388db</guid><dc:creator>nbedbury</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Is editing `BLE_GAP_WHITELIST_ADDR_MAX_COUNT` in the SDK source code the proper way to limit whitelist to 1?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a way to change that value without impacting other apps that use the SDK?&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><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/171298?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 08:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a96d74c-5b77-4c12-b02c-b009aa8023aa</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Glad to hear you got smarter. Yes, please update me if you have any more questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/171248?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 21:59:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94ff3ff1-2aa5-4c18-a808-a0dc071908b0</guid><dc:creator>nbedbury</dc:creator><description>&lt;p&gt;Thanks Simon, one of the links suggested looking at the `ble_app_hrs_c` example, which helped me realize I am not calling `pm_conn_sec()` from my central app currently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I need to dig into whether this answers my other questions and will update the post again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting one device</title><link>https://devzone.nordicsemi.com/thread/171064?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 09:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ae85940-db70-4b02-aceb-9a245555e8b0</guid><dc:creator>Simon</dc:creator><description>[quote user=""]1) Is peer manager the proper library to handle this, using SDK 15.2?&amp;nbsp; I&amp;#39;ve seen mention of peer manager being experimental, and I&amp;#39;m not familiar with all the libraries of the SDK yet.[/quote]
&lt;p&gt;&amp;nbsp;Yes, the peer manager is the right library to handle this, and it is not experimental anymore (For SDK&amp;#39;s newer that version 11 I believe). You should be able to both bond and add a whitelist by using the Peer Manager&lt;/p&gt;
[quote user=""]2) Should the whitelist be done on the central or peripheral (or both) ?&amp;nbsp; It seems like there is mention of whitelisting in either type of device in the examples.[/quote]
&lt;p&gt;Yes it is possible to set a whitelist on the central and the peripheral, as mentioned &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10804/who-does-whitelisting---master-or-peripheral"&gt;here&lt;/a&gt;. What&amp;nbsp;to choose, depends on the needs of your application. If you want the central to connect and bond to&amp;nbsp;one specific peripheral, but let the peripheral be able to receive scan requests from other central devices, then you should only add a whitelist to the central only. If you want both the central and peripheral to just see each other, then you should add a whitelist on both devices.&lt;/p&gt;
[quote user=""]3) Is bonding required for whitelisting?&amp;nbsp; Thus far, I haven&amp;#39;t been able to get devices automatically bonded, although SEC_PARAM_BOND is set to `1` for each app.[/quote]
&lt;p&gt;&amp;nbsp;Yes it is possible to use whitelisting without bonding. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42334/direct-advertising-to-any-device"&gt;this&lt;/a&gt; case.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have any more question regarding the implementation of bonding and whitelisting, please ask.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>