<?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>use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23008/use-whitelist-in-central-sdk12</link><description>I want to use whitelist in Central (nrf51822,SDK12),but I don&amp;#39;t know which function to add the MAC address.
These three functions： 
 peer_list_get(pm_peer_id_t * p_peers, uint32_t * p_size);
whitelist_load();
scan_start_with_whitelist(void);
 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jul 2017 12:58:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23008/use-whitelist-in-central-sdk12" /><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90520?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 12:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca4ae83e-5379-401c-bc84-59f685dc7abf</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You should set the address and add_cnt &lt;strong&gt;after&lt;/strong&gt; you call pm_whitelist_get()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90523?ContentTypeID=1</link><pubDate>Sun, 02 Jul 2017 10:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d948735e-3d8a-4ea3-9806-6fd069dc34e6</guid><dc:creator>gst</dc:creator><description>&lt;p&gt;yes, I add the address to p_whitelist_addrs directly .But after the call pm_whitelist_get() ,I find add_cnt =0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90524?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2017 08:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b622b234-596c-43ec-821a-10e2eeeff403</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Do you do bonding with the peer device ? If you do, then the peer should be added automatically to the peer list.&lt;/p&gt;
&lt;p&gt;What you can do, if you don&amp;#39;t do bonding, is to add the address to p_whitelist_addrs directly . You can find where to add it in scan_start() , just add your extra address after the call pm_whitelist_get() and increase add_cnt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90522?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2017 14:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09831e11-7f0b-4240-ae7e-2a58a326a7b2</guid><dc:creator>gst</dc:creator><description>&lt;p&gt;In addition, like you said,  I sets the whitelist in &lt;code&gt;whitelist_load()&lt;/code&gt;.From &lt;code&gt;ble_app_hrs_c&lt;/code&gt;,What should I do in &lt;code&gt;scan_start()&lt;/code&gt;? This defines &lt;code&gt;ble_gap_addr_t whitelist_addrs[8];&lt;/code&gt;.So, I don&amp;#39;t know how to deal with whitelist. Is it add &lt;code&gt;pm_peer_id_t peers[8]&lt;/code&gt; or &lt;code&gt;ble_gap_addr_t whitelist_addrs[8]&lt;/code&gt;?
thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90521?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2017 14:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03d7f671-087c-47ed-a028-e0551655be6f</guid><dc:creator>gst</dc:creator><description>&lt;p&gt;Thank you for your answer. What you said is correct, but I don&amp;#39;t konw how to add a suitable whitelist format in (&lt;code&gt;whitelist_load()&lt;/code&gt;). This is defined in this function &lt;code&gt;pm_peer_id_t peers[8];&lt;/code&gt; ,I want to add a MAC adress &lt;code&gt;{0xF5,0X51,0x43,0x5D,0x41,0x43}&lt;/code&gt;.I guess add the MAC adress  in &lt;code&gt;peers&lt;/code&gt;, Is that right?Thanks again！&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: use whitelist in Central(SDK12)</title><link>https://devzone.nordicsemi.com/thread/90519?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2017 11:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97c4c0e2-91c1-4134-997b-17c53c066e6c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I recommend looking at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/ble_sdk_app_hrc.html?cp=4_0_2_4_2_0_0"&gt;BLE Heart Rate Collector Example&lt;/a&gt; (&lt;code&gt;ble_app_hrs_c&lt;/code&gt;), which uses peer manager and whitelists for a central. It sets the whitelist from &lt;code&gt;whitelist_load()&lt;/code&gt;, and uses a function &lt;code&gt;peer_list_get()&lt;/code&gt; to build the list of (bonded) peers.&lt;/p&gt;
&lt;p&gt;To directly connect to a whitelisted device, use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v3.0.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_3_0_1_1_2_1_2_11&amp;amp;anchor=gacb36dc9947591179acb83aef50b04282"&gt;sd_ble_gap_connect()&lt;/a&gt; with use_whitelist set in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/structble__gap__scan__params__t.html"&gt;ble_gap_scan_params_t&lt;/a&gt;. You can also set use_whitelist in the scan parameters for &lt;code&gt;sd_ble_gap_scan_start()&lt;/code&gt;, which will generate &lt;code&gt;BLE_GAP_EVT_ADV_REPORT&lt;/code&gt; events only for advertisements from whitelisted devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>