<?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>Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61843/device-name-missing-from-advertising-response</link><description>I&amp;#39;m trying to build a quick application to scan for all devices in the vicinity and print out their details (device name, manf data, RSSI, and BLE address). I am parsing the p_scan_evt-&amp;gt;params.p_not_found object to do this. It looks like it&amp;#39;s working</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 06 Sep 2020 22:45:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61843/device-name-missing-from-advertising-response" /><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/268162?ContentTypeID=1</link><pubDate>Sun, 06 Sep 2020 22:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a8081a8-cb74-4f73-8b88-585f90d5efba</guid><dc:creator>Marcel </dc:creator><description>&lt;p&gt;@srimonr , Im having the same issue here with nrf52832 + sd132 7.0.1 + sdk17&lt;/p&gt;
&lt;p&gt;Im receiving adv packets during scanning, the packet is correct from the gap perspective (the format and size are correct), but it does not contain the advertising name within. I CAN see the advertising name in the Android App, so the name is there, its just not presented to me from the SoftDevice event&amp;nbsp;- can you think of a reason this happens?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dropbox.com/s/a86lftnu5ga9wee/screenshot%202020-09-07%20at%2000.27.06.png?dl=0"&gt;www.dropbox.com/.../screenshot 2020-09-07 at 00.27.06.png&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Im handling this in&amp;nbsp;NRF_BLE_SCAN_EVT_FILTER_MATCH event in&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;scan_evt_handler() from here:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void scan_init(void) {
  ret_code_t err_code;
  nrf_ble_scan_init_t init_scan;

  memset(&amp;amp;init_scan, 0, sizeof(init_scan));

  init_scan.connect_if_match = false;
  init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;

  err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);
  APP_ERROR_CHECK(err_code);

  err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_UUID_FILTER, &amp;amp;m_nus_uuid);
  APP_ERROR_CHECK(err_code);

  err_code =
      nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_UUID_FILTER, false);
  APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/252332?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 09:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae6ec512-2728-4045-94cf-626a164fdfc3</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Daniel&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, I was positive the advertising reports were added in that example by default. Your ble_evt_handler will have to look something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t            err_code;
    ble_gap_evt_t const * p_gap_evt = &amp;amp;p_ble_evt-&amp;gt;evt.gap_evt;


    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_ADV_REPORT:
            if (p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[0] == 0xD3)
            {
                NRF_LOG_INFO(&amp;quot;adv_report from %02x:02x:02x:02x:02x:02x&amp;quot;, p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[0],
                                                                        p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[1],
                                                                        p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[2],
                                                                        p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[3],
                                                                        p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[4],
                                                                        p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[5]);
                uint8_t channel = p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.ch_index;
                uint16_t len = (uint16_t)p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.data.len;
                NRF_LOG_INFO(&amp;quot;adv_report channel %d, len %d&amp;quot;, channel, len);
                
                NRF_LOG_INFO(&amp;quot;advertisement:&amp;quot;);
                for (uint16_t i=0; i&amp;lt;len; i++)
                {
                    NRF_LOG_RAW_INFO(&amp;quot;%02x&amp;quot;, p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.data.p_data[i]);
                    if(i%10 == 0 &amp;amp;&amp;amp; i != 0)
                    {
                        NRF_LOG_RAW_INFO(&amp;quot;\r\n&amp;quot;);
                    }
                    else if(i&amp;lt;len-1)
                    {
                        NRF_LOG_RAW_INFO(&amp;quot;:&amp;quot;);
                    }
                }
                NRF_LOG_RAW_INFO(&amp;quot;\r\n&amp;quot;);
            }
            break;



&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Keep in mind that this snippet has been edited to add print into the ble_evt_handler, but it is what I had available at the time. The advertising report (BLE_GAP_EVT_ADV_REPORT) should handle the initial advertisement and the scan response if any.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/252218?ContentTypeID=1</link><pubDate>Thu, 28 May 2020 13:47:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2e03bfa-2ce4-4964-a0fa-2279a8a5113d</guid><dc:creator>phipi</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not seeing in the ble_app_uart_c example&amp;#39;s ble_evt_handler where it would be handling received advertising data. Maybe I&amp;#39;m missing something obvious, but could you please be a bit more specific?&lt;/p&gt;
&lt;p&gt;Just for some more info, I&amp;#39;m using SDK 16 and my scanner doesn&amp;#39;t ever establish a connection with any device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/252129?ContentTypeID=1</link><pubDate>Thu, 28 May 2020 10:27:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37ab1f29-eb90-4155-bf33-935f8dc469c2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Thank you for specifying. I didn&amp;#39;t realize you were developing the scanning device, sorry about that. In that case, you can check out the ble_app_uart_c example, and its ble_evt_handler, which handles the received advertising data.&lt;/p&gt;
&lt;p&gt;If your peripheral and central connect &amp;quot;right away&amp;quot; like the ble_app_uart and ble_app_uart_c examples do, that might be the reason you don&amp;#39;t get the scan response, as the devices might connect before a scan response is sent at all.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/252005?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 14:16:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebe685e9-fb5e-44e4-be49-ff7cee5e3e89</guid><dc:creator>phipi</dc:creator><description>&lt;p&gt;Hi Simon, thanks for the info, that gives me a few things to look into.&lt;/p&gt;
&lt;p&gt;That being said, I&amp;#39;m actually not working on the peripheral device at all just the scanner so I don&amp;#39;t have control over what data is being advertised.&lt;/p&gt;
&lt;p&gt;I think the crux of the issue is that I can see all the fields in the nRF Connect Android app, but not with my nRF52 scanner. So the device must be advertising correctly, however I&amp;#39;m unable to read all the data from it correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device Name Missing from Advertising Response</title><link>https://devzone.nordicsemi.com/thread/251955?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 12:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cacb239d-c182-46e8-ae25-6ae12a0cbb13</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you defined a device name, included the device name in your gap_params_init(),&amp;nbsp;and set the advdata.name_type to BLE_ADVDATA_FULL_NAME in your advertising_init()? You can, for example, see the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_nus_eval.html"&gt; ble_app_uart example&lt;/a&gt; for reference as to how to set up your device to advertise with its name.&lt;/p&gt;
&lt;p&gt;If it doesn&amp;#39;t appear in your advertising packet after these steps are in order, that means that the advertising packet is filled up, and does not have room for the device name, in which case you will have to either cut some of the advertising data or add scan response data with the additional information (like the device name). The ble_app_uart also includes scan response data as seen in the srdata calls in advertising_init(). You can also check out the &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial"&gt;BLE service tutorial&lt;/a&gt; for details on how to add scan response data to your advertisements.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>