<?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>BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56338/beacon-scanner-to-read-more-than-31-byte-of-advertising-data</link><description>Hello everyone, 
 I&amp;#39;m writing a code for Beacon scanner using: CONTROLLER : nRf52832, SDK : nRF5_SDK_15.3.0_59ac345 SOFTDEVICE : s132_nrf52_6.1.1_softdevice.hex 
 
 I&amp;#39;m using &amp;quot;ble_app_uart_c&amp;quot; code as a Beacon scanner. 
 On debugging, the code hits the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jan 2020 04:28:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56338/beacon-scanner-to-read-more-than-31-byte-of-advertising-data" /><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/229737?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 04:28:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0632f22c-2421-45d7-927c-3d0f1a0ff2d4</guid><dc:creator>VIGNESH C</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&lt;/p&gt;
&lt;p&gt;Now i&amp;#39;m able to receive entire advertising data. Has received the remaining advertising data in separate event.&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/229572?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 10:28:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9f5b5a1-15ee-4509-a40a-6cbd1e9e4df6</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="vignesh"]But how can i receive the remaining advertising data (i.e after 31st byte)[/quote]
&lt;p&gt;&amp;nbsp;It comes in two separate events. Max. payload for each event is 31 bytes.&lt;/p&gt;
[quote user="vignesh"]How to parse scan response packet? can you please help on this..[/quote]
&lt;p&gt;You can probably to in the same way as you did for the main advertisement packet. Can you post some code snippets so I can see how you have implemented this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/229512?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 04:52:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:666ee181-1c8c-4290-bda0-04304c7bae4e</guid><dc:creator>VIGNESH C</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&lt;/p&gt;
&lt;p&gt;Have tested the scan response bit in scanner callback, it is hitting the break-point.&lt;/p&gt;
&lt;p&gt;But how can i receive the remaining advertising data (i.e after 31st byte)&lt;/p&gt;
&lt;p&gt;Even in scanner callback i can see only 31 byte of advertising data,&amp;nbsp;also the packet length is 32 bytes&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1579236716022v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How to parse scan response packet? can you please help on this..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/229116?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2020 16:48:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6bcb16e-4013-4c17-bba4-553e3cedea20</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The scan response comes in a separate event, first, you get the data of the main adv. packet (max. 31 bytes), then you get the scan response.&amp;nbsp;Please verify that you do you get scan response packets.&amp;nbsp;One way you can to that is to check the scan response bit in your scanner callback as shown below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void scan_evt_handler(scan_evt_t const * p_scan_evt)
{
    ret_code_t err_code;

    ble_gap_evt_adv_report_t const * adv_report;

    switch(p_scan_evt-&amp;gt;scan_evt_id)
    {
         case NRF_BLE_SCAN_EVT_NOT_FOUND:
            adv_report = p_scan_evt-&amp;gt;params.filter_match.p_adv_report;

            if (adv_report-&amp;gt;type.scan_response)
            {
                __BKPT(0); //TODO: parse scan response packet
            }
            break;

         default:
             break;
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/228916?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2020 04:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e9022d6-dfac-4783-bd9b-ebb86b2a7476</guid><dc:creator>VIGNESH C</dc:creator><description>&lt;p&gt;Hi Vidar Berg, anything on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/228821?ContentTypeID=1</link><pubDate>Mon, 13 Jan 2020 13:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2f6c1ee-b05a-4f52-ba3d-b6cb5eeb5929</guid><dc:creator>VIGNESH C</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;haven&amp;#39;t put any break-points.&lt;/p&gt;
&lt;p&gt;Actually i am printing first 50 byes of received data in&amp;nbsp;J-link RTT viewer.&lt;/p&gt;
&lt;p&gt;30 bytes&amp;nbsp;i&amp;#39;m able to receive proper data, but after from 31 to 50th bytes, i&amp;#39;m receiving all zeros, which should be Accelerator data.&lt;/p&gt;
&lt;p&gt;I have used &amp;quot;nRF connect&amp;quot; mobile app, in that i can be able to see the valid data from 31 to 50th bytes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any changes i need to make in &amp;quot;sdk_config.h&amp;quot; file like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#define NRF_BLE_SCAN_BUFFER 31&lt;/p&gt;
&lt;p&gt;#define NRF_BLE_SCAN_NAME_MAX_LEN 31&lt;/p&gt;
&lt;p&gt;#define NRF_BLE_SCAN_SHORT_NAME_MAX_LEN 31&lt;/p&gt;
&lt;p&gt;etc..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have changed this bytes to 50 but didn&amp;#39;t received more than 30 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/228815?ContentTypeID=1</link><pubDate>Mon, 13 Jan 2020 13:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c8a0309-86aa-4637-9e67-e78de861558d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re right. I forgot that the UART central example does active scanning by default. But since it&amp;#39;s already enabled, you should be getting adv. report events with the ble_gap_adv_report_type_t::scan_response bit set as well. Can you check if you get any scan responses? Just remember that you cannot continue execution after hitting a breakpoint as that will likely cause the Softdevice to trigger an assertion.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/228511?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2020 09:37:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d5d1b4b-c928-467e-b9f7-50ab9612900d</guid><dc:creator>VIGNESH C</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the replay. I have checked the &amp;quot;scan_init()&amp;quot; function, and the&amp;nbsp;&lt;span&gt;ble_gap_scan_params_t::active bit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Actually the active bit is set to 1, by default.&lt;/p&gt;
&lt;p&gt;But still i&amp;#39;m not receiving more than 30 bytes of beacon data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BEACON SCANNER to read more than 31 byte of advertising data</title><link>https://devzone.nordicsemi.com/thread/228344?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2020 12:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b833db5-5c0e-4958-963e-756bc7d64970</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please make sure the ble_gap_scan_params_t::active bit is gets set to &amp;#39;1&amp;#39; when you initialize the scanner (&lt;a title="ble_gap_scan_params_t" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/structble__gap__scan__params__t.html?cp=4_5_2_2_2_1_4_10"&gt;ble_gap_scan_params_t&lt;/a&gt;). This will make the scanner issue a scan request to receive the scan response packet, which probably contains the remaining sensor data.&lt;/p&gt;
&lt;p&gt;This tutorial here explains a bit about how and why scan responses are used:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>