<?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 example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10422/whitelisting-example-on-central-and-peripheral-devices</link><description>Hello! 
 I have multiple peripherals and multiple centrals. I&amp;#39;m trying to make one peripheral to connect only to one central. 
 I read a way to do this is by using whitelisting. I would like to know where I can find examples on how to implement a whitelist</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Dec 2015 12:55:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10422/whitelisting-example-on-central-and-peripheral-devices" /><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38731?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 12:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd8db9b-1172-4f2b-aff5-a9b9ab1e38a1</guid><dc:creator>Primož Kralj</dc:creator><description>&lt;p&gt;What was the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38723?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 20:25:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:116ea70a-3b64-444d-ab83-d4521b4c8899</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Just posted! Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38719?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 20:03:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ae44e79-893a-4b70-a665-b2f363ec7e5e</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;If you are able to connect to the peripheral with two different centrals I guess you have an issue when populating the whitelist on the peripheral. The easiest for me is if I can debug the complete project (If it&amp;#39;s keil), but it could be interesting to see the part where you populate the whitelist and starts advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38718?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 19:57:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:977db7d9-aaea-404e-918c-2c7ee029f7cd</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Sure, just point out which code section you want to check and from which device (central or peripheral). I&amp;#39;ll glady share!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38717?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 19:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eacae442-0177-42cd-9e52-70fd84ff9ce4</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;8.0.0 has the same behavior. If you still have problem with this, maybe you could share your code on &lt;a href="https://www.nordicsemi.com/eng/user/login"&gt;mypage&lt;/a&gt; so I can take a look at it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38721?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 13:37:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3a269fb-aff9-4378-86ea-a34ee9d451b2</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;I&amp;#39;m using SDK 8.0.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38720?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 13:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2db450ec-4a28-415d-8734-b313be64d01c</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;hmm, I don&amp;#39;t get this. As far as I can see dm_whitelist_create will update the irk_count and addr_count as the whitelist is populated. I&amp;#39;m looking at SDK 10.0.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38722?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 16:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a89b64-614f-4abe-9111-83d9ae0270b9</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Ok. Fiddled with the code:
Whitelist populated? No. Code runs inside BLE_ADV_EVT_WHITELIST_REQUEST. When checking whitelist, pp_addrs is populated but addr_count is equal to zero. pp_irks is populated but irk_count is not.
Central devices use static random address (default).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38716?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 15:10:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b7e6a13-18ed-4ddb-8c1c-7378d2263094</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Thank you. Could you point where (which function) I could verify?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38724?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:55:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee19d926-eadb-465b-86f0-b53faf293fcd</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Can you check the following. Is the whitelist populated and forwarded to the softdevice? And can yo make sure that you haven&amp;#39;t already bonded with both central devices. I assume the central devices uses a static address? if not you could check if you get a IRK match in the connected event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38730?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:32:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83478fc3-9fa7-4fa6-9802-7575d532b2e3</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Yeah, just tested. Even with _FILTER_BOTH, my peripheral keeps connecting to central B (when central A is off).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38729?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3d69d0-a5e2-4761-80c8-8d61b8eed783</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;In mode BLE_ADV_MODE_FAST, adv_params.fp = BLE_GAP_ADV_FP_FILTER_CONNREQ. Let me try with the presented option. I&amp;#39;ll get back.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38728?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:19:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c98412ac-d768-4b83-9737-d9d06b348c49</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;How did you set up &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v0.9.0/structble__gap__adv__params__t.html#a9e2d44610c896a2d1466eb293688f226"&gt;fp&lt;/a&gt;? This needs to be configured to tell the softdevice what to do when a device that&amp;#39;s not in the whitelist sends a connection or scan request. e.g. use BLE_GAP_ADV_FP_FILTER_BOTH.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38727?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:19:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30e4a0f0-385a-4fad-ae46-668dcd66b705</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;So, just to get this right and to verify if whitelist is the right option for me:
I want one peripheral to connect to only one central. After 15 seconds, my peripheral goes to sleep (i&amp;#39;m using sleep_mode_enter()), so when it wakes up, it actually resets, resetting the whitelist. Is whitelisting the right option for me? Or is there other way to keep a non-volatile connection?&lt;/p&gt;
&lt;p&gt;Let me present an example:&lt;/p&gt;
&lt;p&gt;I have 2 centrals, 1 peripheral. Peripheral has whitelist enabled, just like hid keyboard example presents. Both centrals are on. When I turn on my peripheral, it connects to central A. If I turn off central A and keep central B on, peripheral connects to central B. I want to avoid this recconection behavior. I want the peripheral to connect only to central A, even if other centrals are available.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38726?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 11:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b1c06f-d239-46c4-8c6e-7a97581338cb</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;No, you will have to call dm_whitelist_create to update the whitelist, so you are in control of when this changes. Normally this will be done right before you start advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38725?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 11:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:648a4404-c714-4664-97b0-ccdf1f7dcfbc</guid><dc:creator>F&amp;#225;vero</dc:creator><description>&lt;p&gt;Is the whitelist normally volatile? I did some testing, and it turns out volatile (when I turn off and on my peripheral, sometimes it connects to the &amp;quot;wrong&amp;quot; central). Is there a way to make it non-volatile in peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting example on central and peripheral devices</title><link>https://devzone.nordicsemi.com/thread/38715?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 10:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98c339e2-8802-4d2c-ba1b-7a5440792ef6</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;For Peripheral you can look at the hid keyboard example. But all you need to do is provide the whitelist to &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v0.9.0/structble__gap__adv__params__t.html"&gt;ble_gap_adv_params_t&lt;/a&gt;. This is populated using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/group__dm__security__api.html#gac5af9f76a8de0285c8a4d5c05dfa72e0"&gt;dm_whitelist_create&lt;/a&gt;. For central you can look at ble_app_hrs_c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>