<?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>How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46627/how-can-i-implement-whiteist-in-sdk-15-2-0</link><description>i&amp;#39;m trying to build a scanner that scan only a list of devices , and i want to use a whitelist . 
 i didn&amp;#39;t understand the concept of the new whitelisting in SDK 15.2.0, i tried to use ble_app_uart example but it didn&amp;#39;t work 
 the programme that i want</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 May 2019 08:53:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46627/how-can-i-implement-whiteist-in-sdk-15-2-0" /><item><title>RE: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/186875?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 08:53:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d13d9d4a-15e2-45fa-b206-a0fe209de138</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The error 0x3202 is the error&amp;nbsp;BLE_ERROR_GAP_INVALID_BLE_ADDR, and the explanatory text is the following:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The upper two bits of the address do not correspond to the specified address type&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Please check your address.&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: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/186003?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 14:01:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0655eb0e-b060-4f5c-a4c5-5cbd6c85b908</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;okay ! thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i used&amp;nbsp;&lt;em&gt;sd_ble_gap_whitelist_set() &lt;/em&gt;inside&amp;nbsp;&lt;em&gt;void whitelist_load() &lt;/em&gt;function&lt;em&gt; , &lt;/em&gt;&lt;em&gt;&amp;nbsp;an error is apears&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2262.1.png" /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6560.2.png" /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/185783?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 15:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a30e97-2d3d-4eab-9b38-56890140557d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t matter if you are scanning or advertising, it is set the same way. You use the function&amp;nbsp;&lt;em&gt;sd_ble_gap_whitelist_set()&amp;nbsp;&lt;/em&gt;for both cases.&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: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/185688?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 11:03:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4f5af06-581b-476f-9e51-733691a6e9a6</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;thanks .&lt;/p&gt;
&lt;p&gt;I think you misunderstood me.&lt;/p&gt;
&lt;p&gt;i&amp;#39;m trying to build a scanner with whitelist , which means a ble central (gateway) , scan only a list of advertiser (non-connectable advertiser).&lt;/p&gt;
&lt;p&gt;not an advertiser that advertise with whitelist .&lt;/p&gt;
&lt;p&gt;please help me on that , i just need an example of enabling whitelist and adding the list of addresses&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/184797?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faf787ab-37a7-4fd4-8a92-c352799145ba</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I am sorry, the whitelist in the tutorial I pointed you to was using an older SDK. In SDK 15.2 you have to use the function &lt;em&gt;sd_ble_gap_whitelist_set()&lt;/em&gt;. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19130/activate-and-set-whitelist-with-sdk-13-0-0"&gt;Here&lt;/a&gt; is a thread that demonstrates how to do it with SDK 13, and I think the approach is the same with SDK 15.2.&lt;/p&gt;
&lt;p&gt;Please tell me if you encounter any more problems.&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: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/184629?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 18:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f55776b-964d-4024-8bc2-d28d634ad7bb</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;thank you&lt;br /&gt;yes . i want to set the whitelist manually , i follow the link but it didn&amp;#39;t work in SDK 15.2.&lt;/p&gt;
&lt;p&gt;for example : there is no type named&amp;nbsp; &amp;nbsp;&lt;code&gt;ble_gap_whitelist_t  &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;how can i set whitelist manually , is there an example in SDK 15.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/184193?ContentTypeID=1</link><pubDate>Sun, 28 Apr 2019 21:09:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f6fab2b-163a-43cf-bb63-941166cd5cf9</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;What you are doing here will not set the whitelist. The&amp;nbsp;arrays&amp;nbsp;&lt;em&gt;whitelist_addrs&lt;/em&gt; and&amp;nbsp;&lt;em&gt;whitelist_irks &lt;/em&gt;are sent into the function&amp;nbsp;&lt;em&gt;pm_whitelist_get(..)&lt;/em&gt;,&amp;nbsp;and that function simply&amp;nbsp;store the whitelist into the arrays (addresses and the belonging irk&amp;#39;s), which is previously set using&amp;nbsp;&lt;em&gt;pm_whitelist_set()&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;However, the whitelist is set inside the function &lt;em&gt;whitelist_load()&lt;/em&gt; thorugh the function &lt;em&gt;pm_whitelist_set().&amp;nbsp;&lt;/em&gt;Normally a whitelist is set based on the bonded peers stored in flash, and you can see that this is done first by looking inside the function&amp;nbsp;&lt;em&gt;whitelist_load(). &lt;/em&gt;First the peer ID&amp;#39;s are loaded from flash through&amp;nbsp;&lt;em&gt;peer_list_get(),&amp;nbsp;&lt;/em&gt;&lt;em&gt;&lt;/em&gt;and those peers are then whitelisted through&amp;nbsp;&lt;em&gt;pm_whitelist_set().&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It seems like you want to set the whitelist manually, and &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/bluetooth-smart-and-the-nordics-softdevices-part-1"&gt;here&lt;/a&gt; is a link that explains how to do that.&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: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/184186?ContentTypeID=1</link><pubDate>Sun, 28 Apr 2019 11:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f49d714-bef3-429d-8415-7edce0280c99</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;sorry i&amp;#39;m using&lt;span&gt;&amp;nbsp;&lt;/span&gt;ble_app_hrs_c exemple not&amp;nbsp;&lt;span&gt;ble_app_uart&amp;nbsp;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;i didn&amp;#39;t know how to use it ,i just add adresses to whitelist buffer&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
ble_gap_addr_t       dkAdrs1     = {0,BLE_GAP_ADDR_TYPE_RANDOM_STATIC,{0x03,0xCC,0xD2,0xF4,0x30,0xEB}};
ble_gap_addr_t       dkAdrs2     = {0,BLE_GAP_ADDR_TYPE_RANDOM_STATIC,{0xEC,0xAD,0xD6,0xA2,0x56,0x67}};//EC:AD:D6:A2:56:67
 
static void on_whitelist_req(void)
{
    ret_code_t err_code;

   // Whitelist buffers.
    ble_gap_addr_t whitelist_addrs[8]={dkAdrs1,dkAdrs2};
    ble_gap_irk_t  whitelist_irks[8];

    memset(whitelist_addrs, 0x00, sizeof(whitelist_addrs));
    memset(whitelist_irks,  0x00, sizeof(whitelist_irks));
    
      
    uint32_t addr_cnt = (sizeof(whitelist_addrs) / sizeof(ble_gap_addr_t));
    uint32_t irk_cnt  = (sizeof(whitelist_irks)  / sizeof(ble_gap_irk_t));

    // Reload the whitelist and whitelist all peers.
    whitelist_load();

    // Get the whitelist previously set using pm_whitelist_set().
    err_code = pm_whitelist_get(whitelist_addrs, &amp;amp;addr_cnt,
                                whitelist_irks,  &amp;amp;irk_cnt);

    if (((addr_cnt == 0) &amp;amp;&amp;amp; (irk_cnt == 0)) ||
        (m_whitelist_disabled))
    {
        // Don&amp;#39;t use whitelist.
        NRF_LOG_INFO(&amp;quot;=&amp;gt; Don&amp;#39;t use whitelist&amp;quot;);
        err_code = nrf_ble_scan_params_set(&amp;amp;m_scan, NULL);
        APP_ERROR_CHECK(err_code);
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How Can I Implement Whiteist In SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/184092?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 13:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bade08b2-58a9-4b11-a436-9abe715aa560</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;How do you set the whitelist? Could you share the &lt;em&gt;main.c&lt;/em&gt; file?&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>