<?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 start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10364/how-can-i-start-an-advertising-with-a-whitelist</link><description>Hi all,
I&amp;#39;m reading the ble_peripheral samples of the SDK. I know start a advertising with the function ble_advertising_start();
Now, i know a central address, then i want connect to that device. I want start the advertising with a whitelist for can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Sep 2018 11:31:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10364/how-can-i-start-an-advertising-with-a-whitelist" /><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/147779?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 11:31:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb88520-960e-4b75-aad6-c1d62bb6bc1b</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi&amp;nbsp; King,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Whether you could implement the whitelist successsfully(with the address of the central deice)?..and advertise with the whitelist?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Whether it could connect successfully to that central only?&lt;/p&gt;
&lt;p&gt;If yes, will you please share your code .&lt;/p&gt;
&lt;p&gt;Currently I am up to this. still confused how to proceed.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38294/how-to-implement-and-use-the-whitelist-on-peripheral-side-so-as-to-make-the-connection-of-the-peripheral-device-with-the-phone-having-highest-rssi-value"&gt;devzone.nordicsemi.com/.../how-to-implement-and-use-the-whitelist-on-peripheral-side-so-as-to-make-the-connection-of-the-peripheral-device-with-the-phone-having-highest-rssi-value&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38455?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 17:47:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1eabb28-e558-4837-be8c-cff11f504a9a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you have converted my comment to answer, thanks for that , but if you want to accept this as answer then please click the ✓ on the left side of this answer. Good luck with your project&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38456?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 01:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e36ff595-84a4-42f1-94d6-3e6a6350c10f</guid><dc:creator>king</dc:creator><description>&lt;p&gt;Thanks very much, Aryan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38454?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 09:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6aa7d0-3eea-4567-8b31-78da41e14f13</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi King,&lt;/p&gt;
&lt;p&gt;You question tag says that you are using nrf51822 and then you confused me saying that you are using SDK0.9.1 (which is for nRF52)&lt;/p&gt;
&lt;p&gt;You can just use directed advertising and implement BLE_ADV_EVT_PEER_ADDR_REQUEST.
Please read about the advertising module &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/lib_ble_advertising.html?cp=4_1_1_3_1_1"&gt;here&lt;/a&gt; and use directed advertising instead of whitelist if you just want to send advertising to one know (unbonded) central&lt;/p&gt;
&lt;p&gt;If you still want to use whitelist, then you can do it, but in your above code snippet, what happens is, that when the Advertising module asks your app for whitelist , your app is asking device manager to provide that info. That means that device manager will give the already bonded peers as whitelist. I think that is not what you intend. Instead of asking device manager, you need to construct your whitelist with the central address-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38451?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 08:12:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e09e85e0-6f77-4861-ab5f-1d64f63bf6c1</guid><dc:creator>king</dc:creator><description>&lt;p&gt;Also, i add
options.ble_adv_whitelist_enabled = BLE_ADV_WHITELIST_ENABLED.
in function advertising_init&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38450?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 08:03:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3059b64e-b571-43bf-82d1-41298fd7358f</guid><dc:creator>king</dc:creator><description>&lt;p&gt;case BLE_ADV_EVT_WHITELIST_REQUEST:
{
ble_gap_whitelist_t whitelist;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;					ble_gap_addr_t    * sp_whitelist_addr[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
					ble_gap_irk_t     * sp_whitelist_irk[BLE_GAP_WHITELIST_IRK_MAX_COUNT];
					whitelist.addr_count = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
					whitelist.irk_count  = BLE_GAP_WHITELIST_IRK_MAX_COUNT;
					whitelist.pp_addrs   = sp_whitelist_addr;
					whitelist.pp_irks    = sp_whitelist_irk;

					err_code = dm_whitelist_create(&amp;amp;m_dm_app_id, &amp;amp;whitelist);
					APP_ERROR_CHECK(err_code);

					err_code = ble_advertising_whitelist_reply(&amp;amp;whitelist);
					APP_ERROR_CHECK(err_code);
					break;
			}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38449?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 07:54:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62881eb3-7f12-4618-af62-c1faf067ed05</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;please post your code where the error is returned, please post enough code that we will be able to decode the problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38448?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 07:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11451ab3-8aaa-4857-b62a-3b659766a6f9</guid><dc:creator>king</dc:creator><description>&lt;p&gt;oh, it&amp;#39;s white-list~ I use that thread and correctly with that sequence. But, a NRF_ERROR_INVALID_PARAM error with the call of func sd_ble_gap_adv_start.
Also, i find that white-list is gotten from pstorage module. if i have an device address, how to create an white-list? Thanks~~~&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38447?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 08:27:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afce28da-d99c-4df5-9a15-114393176a66</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Note that it&amp;#39;s &lt;strong&gt;&lt;em&gt;White&lt;/em&gt;&lt;/strong&gt;-list (as opposed to Black-list) - not Write-list !&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Whitelist"&gt;en.wikipedia.org/.../Whitelist&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38453?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 06:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cead601e-eea6-458c-8c3f-fa001b0be7f0</guid><dc:creator>king</dc:creator><description>&lt;p&gt;hi, dear aryan,
I add that statement. But i find that statement doesn&amp;#39;t run before i call sd_ble_gap_adv_start(&amp;amp;adv_params). I want start an advertising with writelist the first time i start advertsment but after unpair. Do they use the same way?
Thank you very much~~~~&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i start an advertising with a whitelist?</title><link>https://devzone.nordicsemi.com/thread/38452?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 06:29:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b74a0960-2776-4a77-ab4b-27706c39e7b2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Please take a look at &lt;a href="https://devzone.nordicsemi.com/question/36944/enabling-whitelisting/"&gt;this&lt;/a&gt; thread&lt;/p&gt;
&lt;h2&gt;Updated&lt;/h2&gt;
&lt;p&gt;When you call &lt;code&gt;ble_advertising_init&lt;/code&gt; function, you give an evt_handler function for this module.
That event handle module will be called with event &lt;code&gt;BLE_ADV_EVT_WHITELIST_REQUEST&lt;/code&gt; and &lt;code&gt;BLE_ADV_EVT_PEER_ADDR_REQUEST&lt;/code&gt; when your application calls &lt;code&gt;ble_advertising_start&lt;/code&gt; in which your application provides whitelist details.
Look at the message sequence chart for this here
Your advertisement mode cannot be directed or directed_slow because whitelist is not used for those types.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>