<?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>New scanning module: How can I know the length of advertisements?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39024/new-scanning-module-how-can-i-know-the-length-of-advertisements</link><description>Hi all, 
 I&amp;#39;m working with nRF52840 PDK and I&amp;#39;m using the last SDK and SoftDevice version: SDK v15.2.0 and SoftDevice v6.1. 
 I&amp;#39;m using the scanning module introduced in this new release in order to scan BLE advertisements. 
 But I can&amp;#39;t find the easy</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Oct 2018 07:21:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39024/new-scanning-module-how-can-i-know-the-length-of-advertisements" /><item><title>RE: New scanning module: How can I know the length of advertisements?</title><link>https://devzone.nordicsemi.com/thread/151580?ContentTypeID=1</link><pubDate>Thu, 04 Oct 2018 07:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b1293d-edb0-407c-bca7-d467bd4505b0</guid><dc:creator>manumonti</dc:creator><description>&lt;p&gt;Hello Simon,&lt;/p&gt;
&lt;p&gt;That was exactly what I needed. Thank you.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m finishing a Bluetooth 5 advertisements scanner for extended advertisements that can be run in nRF52840 PDK and nRF52840 dongle.&lt;/p&gt;
&lt;p&gt;I think this can be useful because currently nRF52840 dongle isn&amp;#39;t able to read extended advertisements using nRF Connect Desktop application.&lt;/p&gt;
&lt;p&gt;Do you know where can I publish my code (it&amp;#39;s on GitHub actually).&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New scanning module: How can I know the length of advertisements?</title><link>https://devzone.nordicsemi.com/thread/151206?ContentTypeID=1</link><pubDate>Tue, 02 Oct 2018 11:12:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6865f084-e62c-4dc9-821e-61a2a3d3821d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I was able to read the data field by executing the following steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start with the ble_app_uart central example&lt;/li&gt;
&lt;li&gt;Copy the lines below into &lt;em&gt;scan_evt_handler(..)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    NRF_LOG_INFO(&amp;quot;Received data (length): %d &amp;quot;,p_scan_evt-&amp;gt;params.p_whitelist_adv_report-&amp;gt;data.len);
    NRF_LOG_INFO(&amp;quot;Received data (length): %d &amp;quot;,p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;data.len);&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build and flash the application&lt;/li&gt;
&lt;li&gt;Build and flash the ble_app_uart peripheral application onto another chip&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, I was able to read the length of the received data in the central example.&lt;/p&gt;
&lt;p&gt;Let me explain.&amp;nbsp;In the central example when, scanning is initialized, a scanning event handler is provided, which will be called when receiving an advertisement packet.&amp;nbsp;When this function is called, a scan event is provided. As seen in the example above, this struct contains an advertising report (&lt;em&gt;p_whitelist_adv_report&lt;/em&gt; or &lt;em&gt;p_not_found&lt;/em&gt;), which contains information about the size of the data field in the received advertisement packet.&lt;/p&gt;
&lt;p&gt;Best, regards Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>