<?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>Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11257/unable-to-receive-directed-advertisements</link><description>For some reason I&amp;#39;m not able to receive directed advertisements on the nRF51 development kit. I verified my nRF51 peripheral is sending the direct advertisement packets using the Sniffer tool, but the I don&amp;#39;t see any BLE_GAP_EVT_ADV_REPORTS being generated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Apr 2016 07:52:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11257/unable-to-receive-directed-advertisements" /><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42324?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2016 07:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b263c8c-e4c6-4978-8bb4-b898d5add863</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Aaron. Det behavior you describe is expected. Great that you figured it out. Karl. Sorry to hear that you never got it working, but great that you found a workaround.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42328?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 17:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0850fa30-698c-440d-a30a-a85b3cf451bf</guid><dc:creator>Aaron Bilger</dc:creator><description>&lt;p&gt;It took a while to confirm, but this looks correct per spec. Bluetooth 4.0 spec section 2.3.1 shows ADV_DIRECT_IND must have the InitA (initiator address to advertise to), but lacks the AdvData payload field which all other advertisement types (ADV_IND, ADV_NONCONN_IND, ADV_SCAN_IND).&lt;/p&gt;
&lt;p&gt;So directed advertisements cannot, per the spec, include UUID, name, or other such info. I haven&amp;#39;t found this in Nordic docs and the SDK examples don&amp;#39;t handle this case, but BT spec itself is clear. And good news is the S120 SoftDevice code itself appears to be getting the packets correctly.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to add a special check for ADV_DIRECT_IND, where if its address matches my whitelist (manual check), I&amp;#39;ll assuming it has the services I need and just go to connect.&lt;/p&gt;
&lt;p&gt;Hopefully this approach resolves what you have too, karl? Thanks for getting back with me Petter. I&amp;#39;ll let you know if this approach fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42327?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 16:56:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e4292de-2f6d-4a50-98dd-6be0d9a560f5</guid><dc:creator>Aaron Bilger</dc:creator><description>&lt;p&gt;I&amp;#39;ve done more digging, and will keep it here in case it&amp;#39;s an easier resolve. I think the actual packet sending and receiving is correct, but the SDK example code doesn&amp;#39;t handle directed packets on the central side, leading to the confusion.&lt;/p&gt;
&lt;p&gt;I am now seeing BLE_GAP_EVT_ADV_REPORT. That part was just a mistake on my part checking inside the BLE_GAP_EVT_ADV_REPORT handler case after some error checks. I should have checked immediately, prior to error checks.&lt;/p&gt;
&lt;p&gt;The error checks on parsing for name or UUID16 fail, causing the BLE central example code to ignore directed advertising packets. They fail because directed packets (p_gap_evt-&amp;gt;params.adv_report in example code) have a dlen of 0, so no parseable data.&lt;/p&gt;
&lt;p&gt;Continued...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42326?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 14:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2404190f-e0f1-4f2e-b8f0-86a5757f2cd3</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;By the way, I never was able to get direct advertisements working.  We control both Peripheral and Central in our application, so I was able to do a work around&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42329?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 12:01:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66f96dd1-bff0-4c14-8115-24bcb4e5fa45</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;@Aaron Bilger I have just tested this, and it seems to be working fine. Could you open a new question, where you explain your test setup in detail? Maybe you can include your complete test projects as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42325?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2016 21:51:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:136d331c-d2d8-417a-aa45-503016af0e77</guid><dc:creator>Aaron Bilger</dc:creator><description>&lt;p&gt;I wanted to add that I am experiencing the exact same issue, and provide more detail on my scenario.&lt;/p&gt;
&lt;p&gt;Using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nRF51822 on both sides&lt;/li&gt;
&lt;li&gt;SDK 10.0&lt;/li&gt;
&lt;li&gt;SD1.10 8.0.0 on peripheral side&lt;/li&gt;
&lt;li&gt;SD1.20 2.1.0 on central side&lt;/li&gt;
&lt;li&gt;both central and peripheral use consistent type 1 (random, static) addresses obtained with sd_ble_gap_address_get()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Code was based on SDK10 examples for heart rate monitor. As long as peripheral uses non-directed advertising, central quickly sees its advertisements and can connect to it. If directed (fast or slow) advertising is used, the advertisements are never seen (i.e. no BLE_GAP_EVT_ADV_REPORT received).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve confirmed using Master Control Panel 3.10 that the peripheral is seen sending directed or non-directed advertisements fine.&lt;/p&gt;
&lt;p&gt;Let me know if you have any other ideas, or if there&amp;#39;s anything else I can provide. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42323?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2016 10:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94707776-7370-4ccb-a11c-83900ce1a607</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I see. Then I&amp;#39;m out of ideas. No, there is not any logging in the SoftDevice. Could you edit the question and attach:&lt;/p&gt;
&lt;p&gt;The complete peripheral application project (Which SoftDevice are you using?)&lt;/p&gt;
&lt;p&gt;The modified heart rate collector code. (Which hex file have you flashe the dongle with?)&lt;/p&gt;
&lt;p&gt;Then I can try and test you code here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42322?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2016 19:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14be43be-9ca4-493d-9ee2-8a381fa1060e</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;I assume the directed advertisements are not being received because I don&amp;#39;t see the ADV REPORT events in the serial log messages.&lt;/p&gt;
&lt;p&gt;Is there a way to turn on some kind of logging in SoftDevice stack?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42321?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2016 10:21:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a59e5762-2e75-4158-ad00-e6b721159444</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Strange. It should work. How are you checking the if you are receiving directed advertising events?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42320?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 18:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a82dd185-b06b-4bb0-90ca-40a407d04ed6</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;Currently I have the address of the Central, 0xDE05F038D922, hard-coded in the Peripheral:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gap_addr-&amp;gt;addr_type = 1;
gap_addr-&amp;gt;addr[0] = 0x22;
gap_addr-&amp;gt;addr[1] = 0xD9;
gap_addr-&amp;gt;addr[2] = 0x38;
gap_addr-&amp;gt;addr[3] = 0xF0;
gap_addr-&amp;gt;addr[4] = 0x05;
gap_addr-&amp;gt;addr[5] = 0xDE;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And I acquired the Central address using the sd_ble_gap_address_get API in the Central and dumping it to the console output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[0]=22 [1]=D9 [2]=38 [3]=F0 [4]=05 [5]=DE type=1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Again I verified the address is being sent over the air in the direct advertisement packet by using the sniffer tool.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42318?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 11:06:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:592bf3f1-f8b4-43c0-a46d-b34190724014</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It is not up to the application, the SoftDevice will only forward directed advertising events with matching device address. If you are absolutely sure that you are using the correct device address? Could you explain to me how you extract it from the central, and how you add it to the peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42317?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 18:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57e75323-a28e-4458-9c83-6819b6e0b583</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;Hi Petter,
My peripheral is an nRF51 PCA10028 development board.  My peripheral application code is based on your ble peripheral hrs example provided in SDK 10.0.0. But I&amp;#39;m not using the ble_advertising module which was used by the original hrs code.  My application is interfacing directly to sd_ble_gap_adv_data_set and sd_ble_gap_adv_start.&lt;/p&gt;
&lt;p&gt;My Central is an nRF51 PCA10000 dongle connected to a Windows 10 notebook computer.  The application code is based on the heart rate collector example code that came with the Win 0.5.0 BLE driver.  The scan window is 50ms and the scan interval is set to 100ms.  My application requires the Central to also broadcast beacons every 50ms, so I&amp;#39;m running a thread that alternates between sd_ble_gap_adv_start and sd_ble_gap_adv_stop every 25ms.  However I don&amp;#39;t believe this is related to my problem with the direct advertisements because I still cannot connect if I disable the beacons.&lt;/p&gt;
&lt;p&gt;If I switch the peripheral advertisements to connectable undirected with 20ms adv interval, my central receives the advertisements and my application is able to connect using sd_ble_gap_connect.  So it appears my central scanning is working.&lt;/p&gt;
&lt;p&gt;By the way, when scanning for direct advertisements, is it up to the application to examine the peer_adr in the adv report and determine if the advertisement is targeted for him, or does SoftDevice do this automatically?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42315?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 08:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f573716e-d947-4c2e-a178-f8ae2234ea6a</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes. I used the Windows BLE Driver 0.5.0. Could you explain a bit more on how are you testing this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42316?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 19:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df647d51-2a0c-4ba7-9b3f-481e9e4f0a08</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;Yes, I verified the Initiator address and the RxAdd bit using the sniffer tool and WireShark.&lt;/p&gt;
&lt;p&gt;Did you use a Win32 console application to control the Central?  I&amp;#39;m wandering if my problem has something to do with that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Receive Directed Advertisements</title><link>https://devzone.nordicsemi.com/thread/42319?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 16:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09cf2b83-96a2-4292-97f4-cc27bd73a436</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Seems to be working fine here. Are you sure the device address and address type included in the advertising packet matches with the central you are sending to? The SoftDevice will only forward directed advertising events to the application with matching device address and address type.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>