<?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>Direct advertising example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59911/direct-advertising-example</link><description>Hi, 
 I&amp;#39;m trying to implement some direct advertising, but I&amp;#39;m a little lost in the process. 
 Could you provide me with an example of code ? I read somewhere that ble_app_hid_mouse was doing that, but all I can see is some whitelisting + a start advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Apr 2020 14:43:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59911/direct-advertising-example" /><item><title>RE: Direct advertising example</title><link>https://devzone.nordicsemi.com/thread/243719?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 14:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdced8a3-a6a6-4bbd-abb2-b1e10896d63b</guid><dc:creator>benjamin.forest</dc:creator><description>&lt;p&gt;I investigated a little more following your advice and found my error : I was setting my peer_address before my call to ble_advertising_start when I needed to set it in advertising event callback, under the BLE_ADV_EVT_PEER_ADDR_REQUEST event id. Considering this, it seems to works.&lt;/p&gt;
&lt;p&gt;I will now investigate whitelist for a better approch to my problem.&lt;/p&gt;
&lt;p&gt;Thanks again for your time,&lt;/p&gt;
&lt;p&gt;have a nice day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising example</title><link>https://devzone.nordicsemi.com/thread/243690?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 13:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b98aa753-3d44-4871-9cd7-50d686370eff</guid><dc:creator>benjamin.forest</dc:creator><description>&lt;p&gt;thanks a lot for your quick answer ! I&amp;#39;ll think about that and give you some feedback as soon as possible. Thanks for the advertising module link as well, I was planning to use it but I&amp;#39;m not fluent with the infocenter and did only found code source generated doc &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising example</title><link>https://devzone.nordicsemi.com/thread/243676?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 13:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9607a75-1b02-43a6-99b1-765e5bedf056</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are right that the HID mouse example uses direct advertising, but only when it is bonded. In a normal use case, direct advertising only makes sense when bonded, since then you know which device you should&amp;nbsp;advertise directed to. Also, please note that directed advertising is the only suitable for some special occasions, such as HID mouse and keyboards where you want very fast direct advertisement after a connection loss in order to seamlessly reconnect. You may not see so easily how this is done in the example since it uses the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_ble_advertising.html"&gt;advertising module&lt;/a&gt;. Essentially the advertising module starts with the most aggressive and most restrictive advertising mode, and goes down the list, subsequently using each mode until it&amp;#39;s timeout as long as it is enabled. You can most easily see this by looking at the implementation of&amp;nbsp;adv_mode_next_avail_get() in&amp;nbsp;components\ble\ble_advertising\ble_advertising.c.&lt;/p&gt;
&lt;p&gt;I do not know if that is the case for you, but my impression is that in most cases when customers ask for directed advertising, what they really want is to ensure that only a specific device is allowed to connect. In that case, whitelisting is usually a better approach. For instance, Apple recommends that directed advertising is&amp;nbsp;not used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>