<?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 with pc-ble-driver 2.0, S132, API v3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20152/whitelisting-with-pc-ble-driver-2-0-s132-api-v3</link><description>Hello, 
 I develop a BLE central device based on nRF52 (with the newest connectivity firmware and SoftDevice with API v3) and the pc-ble-driver in version 2.0. 
 Since my device has to connect only known peripherals (previously bonded) I would like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2017 13:01:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20152/whitelisting-with-pc-ble-driver-2-0-s132-api-v3" /><item><title>RE: Whitelisting with pc-ble-driver 2.0, S132, API v3</title><link>https://devzone.nordicsemi.com/thread/78481?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 13:01:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26051f24-0d72-4fd9-9ccf-5c08a6f7bfad</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;Following your example I have made it working. Instead of creating array of &lt;code&gt;ble_gap_addr_t&lt;/code&gt;, I create array of pointers to &lt;code&gt;ble_gap_addr_t&lt;/code&gt;and  now it works.
Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting with pc-ble-driver 2.0, S132, API v3</title><link>https://devzone.nordicsemi.com/thread/78482?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 07:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a55e7a4-4288-420e-a084-423cc9b9b75a</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I have updated my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting with pc-ble-driver 2.0, S132, API v3</title><link>https://devzone.nordicsemi.com/thread/78480?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 13:27:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5aa507d-6088-456b-9fb7-ac56db245791</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;Parameters in the whitelist are copied form &lt;code&gt;BLE_GAP_EVT_AUTH_STATUS&lt;/code&gt; events after bonding, so it seems that both came with addr_peer_id = 0.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;addr_peer_id&lt;/code&gt; parameter is not clear to me. The documentation says that it is &amp;#39;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v3.0.0%2Fstructble__gap__addr__t.html"&gt;Reference to peer in device identities list (as set with sd_ble_gap_device_identities_set) when peer is using privacy.&lt;/a&gt;&amp;#39; but in the structure it is one bit width. So, I assume that it is just a flag if the device is present in the device identities list. Is it correct?&lt;/p&gt;
&lt;p&gt;BTW. I don&amp;#39;t use identities list for now. I just wanted to use whitelist for filtering devices during scanning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting with pc-ble-driver 2.0, S132, API v3</title><link>https://devzone.nordicsemi.com/thread/78479?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 12:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9ae15a8-7691-43fe-8dbe-f1fbd54dc3b9</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;In &lt;code&gt;whitelist&lt;/code&gt;, I see that both added devices have an addr_peer_id of &amp;#39;0&amp;#39;, but I would assume that your devices should have different addr_peer_id&amp;#39;s. Could you double check what their correct addr_peer_id is?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update March 6th, 2017:&lt;/strong&gt; When I test the below here, there is no error code when adding the whitelist. I have tested the code with a regular BLE project, not using pc_ble_driver. Could you test your whitelist code in a regular BLE example?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void add_whitelist(void) 
{

uint32_t err_code;

ble_gap_addr_t  const *  whitelist[2];
ble_gap_addr_t addr_1 = {
			.addr_id_peer = 0,
			.addr_type    = 2,
			.addr         = {0xA2, 0xBD, 0x32, 0x40, 0x15, 0x47}
		};

ble_gap_addr_t addr_2 = {
			.addr_id_peer = 0,
			.addr_type    = 2,
			.addr         = {0x2E, 0xE7, 0x4B, 0x55, 0x8B, 0x43}
		};

whitelist[0] = &amp;amp;addr_1;
whitelist[1] = &amp;amp;addr_2;

err_code = sd_ble_gap_whitelist_set(whitelist,2);	
APP_ERROR_CHECK(err_code);
		
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>