<?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 in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18608/whitelisting-in-s132-v3-for-advertising-filter-policy</link><description>Hi, 
 I am using nRF5 SDK 12.1.0. 
 I have read the s132_nrf52_3.0.0_migration-document.pdf and I am trying to implement the whitelist without the private addresses i.e. just whitelisting public addresses 
 I would like to set a whitelist for advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Sep 2018 06:53:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18608/whitelisting-in-s132-v3-for-advertising-filter-policy" /><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/148523?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 06:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71f85022-3f84-4289-b0b2-8ff769cf6c56</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on nrf52832 , SDK15 and softdevice S132.&lt;/p&gt;
&lt;p&gt;I was referring to your code to imitata the same with hrs example in&amp;nbsp; SDK 15.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have hard coded the MAC address , but it is not connecting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If i disable whitelist it is connecting.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My doubt is , which address(of the phone) should we put?(I am attaching an image)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Image from my Android phone" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20180913_2D00_121540_5B00_1_5D00_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Or is there any restriction to the adddress type of the address in the phone?&lt;/p&gt;
&lt;p&gt;And in which order should the array to be filled?&lt;/p&gt;
&lt;p&gt;I have done as follows(the address is shown in the image)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;peer_addr.addr[0] = 0xbc;&lt;br /&gt; peer_addr.addr[1] = 0x41;&lt;br /&gt; peer_addr.addr[2] = 0x01;&lt;br /&gt; peer_addr.addr[3] = 0x31;&lt;br /&gt; peer_addr.addr[4] = 0x8f;&lt;br /&gt; peer_addr.addr[5] = 0x48;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is this the correct way to fill the array?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanking you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;with regards,&lt;/p&gt;
&lt;p&gt;Geetha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71835?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 10:39:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:098aeb8a-0553-4c57-8556-c661a745560a</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;Thank you Petter! I could not have done it without you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71834?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 09:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ce2e63-897b-40f1-9336-d9764be13d39</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Thanks for sharing Joshua! I&amp;#39;m going to accept your answer and give you a vote :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71833?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 07:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eac7bfb7-75c2-4687-a887-5fec8398ebdc</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;I&amp;#39;ve managed to perform the whitelisting on the Heart Rate example. A big shoutout to Petter for his help and guidance! This would not have been possible without him. The link he posted was very important.
I would like to share my code so that anyone that tries to perform whitelisting can refer to this. Beware that it is not 100% bug free and it is only for evaluation purposes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_advertiser_5F00_whitelist.zip"&gt;ble_app_advertiser_whitelist.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Setup:
You will need to setup GCC with Eclipse in order to compile the codes. I have not done this in Keil so not sure if it is able to.&lt;/p&gt;
&lt;p&gt;Steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To test this, flash S132 v3.0.0 firmware to nRF52832.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, change the bluetooth address to add your own device address to your whitelist in the on_adv_evt() function in the peer_addr.addr variable (under  case BLE_ADV_EVT_WHITELIST_REQUEST)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compile the software&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flash the .hex file into the nRF52832 using nRFgo Studio&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On your smartphone device, download the nRF Connect app from the Play Store&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the app and scan for devices, click on &amp;quot;Connect&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You should be connected to the device.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After that click on the Heart Rate Service and enable notifications to receive heart rate measurements&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71832?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 07:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcd566f7-a5f3-4826-b77a-20e90dd50300</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;Oh my gosh it worked!! But I had to use the nRF Connect App in order to test the connection. If I used the HRS central example app, somehow it is not able to connect to the peripheral.
I added the smartphone&amp;#39;s MAC address to the whitelist and I was able to connect to the nrf52.
After that, I removed the device&amp;#39;s address from the whitelist and was not able to perform the connection afterwards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71831?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:949087c9-e81e-4ce0-b929-221211f024cf</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If I answered your question I would appreciate if you would accept my answer by clicking the circle next to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71830?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:47:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a856b878-d793-41e5-9b6e-35e0bf8291e3</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;Thank you so much for your fast reply!
Oh that&amp;#39;s interesting! Thank you for sharing this with me. I will look into that and try the ble_advertising_start() only. It looks like this default setting of BLE_GAP_ADV_FP_FILTER_CONNREQ is good enough for me since I would only want to filter connection requests to the peripheral.
Thank you so much for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71829?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d19191a-d62a-4f01-a86d-bcd3b381d6f6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The advertising module will set the filter policy for you, but it seems it will set it to BLE_GAP_ADV_FP_FILTER_CONNREQ. I guess you can modify this to BLE_GAP_ADV_FP_FILTER_BOTH in the library, without affecting anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71828?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f00ffc28-9e16-43bb-9705-8ae5d14527af</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;I referred to the documentation and the heart rate application uses the ble_advertising_start() function which comes from the advertising module. Yes I believe I am using the advertising module (sorry this is something new to me).
I would actually like to now only use the advertising module since this function makes it a lot easier to set up advertising. By the way, if we don&amp;#39;t use sd_ble_gap_adv_start(), how can we set the filter policy?
I used sd_ble_gap_adv_start() because it allowed me to set the filter policy in the fp field.&lt;/p&gt;
&lt;p&gt;Thank you for confirming the advertising flag! I will try it out and let you know to see if it can solve my error.
I will need to further read up on the ble_adv_whitelist_reply() function that you mentioned. Thank you for pointing that out too!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71826?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 11:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:105810fb-7eda-4f5d-a480-af65545feb90</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I confirm that only the BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED flag shall be set when advertising with whitelisting.&lt;/p&gt;
&lt;p&gt;sd_ble_gap_whitelist_set() sets the active whitelist in the SoftDevice, this is done by the advertising module if you call ble_adv_whitelist_reply() when you get the BLE_ADV_EVT_WHITELIST_REQUEST event.&lt;/p&gt;
&lt;p&gt;pm_whitelist_set() set the whitelist internally in peer manager, so you can get it later with pm_whitelist_get().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71827?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 11:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:996a6dcc-e32a-4a46-9c6e-67f20446ee17</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I didn&amp;#39;t notice that you were using the advertising module. If you want to use it, you should do like explained &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/lib_ble_advertising.html?cp=4_0_1_3_1_1_1#whitelist"&gt;here&lt;/a&gt;. You can also look at the ble_app_hids_keyboard example on how it is implemented there.&lt;/p&gt;
&lt;p&gt;It gets a bit messy if you start calling sd_ble_gap_adv_start() directly in addition to using the advertising module. I would recommend either only use the advertising module, or implement all advertising functionality yourself. What do you want to do?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71825?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 06:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a50f6d6-ed21-437c-b768-1b43d7821985</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;I did what you had proposed but this time I encounter FATAL error which I believe is reported by APP_ERROR_CHECK(err_code)&lt;/p&gt;
&lt;p&gt;Thank you very much for your suggestion! I came across a function called pm_whitelist_set() and pm_whitelist_get().
What is the difference between using pm_whitelist_set() with sd_ble_gap_whitelist_set()?
Thank you =)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71824?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 06:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c9cf63-d932-4c32-b3a2-8266e9ed0de7</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What if you don&amp;#39;t set either BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71822?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 23:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c036e1b-113f-4961-aa00-a234f27493e6</guid><dc:creator>Joshua Wong</dc:creator><description>&lt;p&gt;Thank you for your reply. I am using BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE as my advertising flag. I have managed to overcome my NRF_ERROR_INVALID_PARAM by setting the adv_params.interval and adv_params.timeout parameters. I am now getting a different error:
BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST.
Upon further investigation, this macro indicates that &amp;quot;Use of Whitelist not permitted with discoverable advertising&amp;quot;. I have already set it to limited discoverable mode.&lt;/p&gt;
&lt;p&gt;I found out an important information in the core specification v4.2, Vol 3, Part C, Section 9.2.3 and 9.2.4 (Limited Discoverable Mode and General Discoverable Mode
&amp;quot;The Host shall set the advertising filter policy to &amp;#39;process scan and connection requests from all devices&amp;#39;. So I believe this is why the error persists.
May I know what type of advertising flags should I be using?
Thank you =)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whitelisting in S132 v3 for advertising filter policy</title><link>https://devzone.nordicsemi.com/thread/71823?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 14:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:611419d1-ca3a-4ddc-b832-bc8e55f404b5</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what is causing this error. What flags are you setting in the advertisments? BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>