<?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>Find name of advertiser</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75941/find-name-of-advertiser</link><description>Hi - I am trying to port some code from nRF5 SDK to NRF Connect SDK. 
 I set up a scan for a specific BT_SCAN_FILTER_TYPE_NAME name and then using the scan_filter_no_match event I get the details of the peripheral that caused the event. 
 I then make</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Jun 2021 02:32:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75941/find-name-of-advertiser" /><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/314057?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 02:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d65b021-f9b4-49df-b41a-7b3ebb14d6af</guid><dc:creator>fgeldenh</dc:creator><description>&lt;p&gt;Great - That is what I wanted. Thank you.&amp;nbsp;I appreciate your help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Will close.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/314031?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 19:08:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbc1bab6-cc48-4cb1-af17-b4eb8aa8b4b2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I made a simple example which I hope will show how this works. Here the scan module filter on UUID, and for advertising packets (and scan response packets) that match I also search for the name and print that. You can do the same in any combination to look fore more data and or other data.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4087.main.c"&gt;devzone.nordicsemi.com/.../4087.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I want to mention one thing which sometimes cause confusion. The functionality used here works on single packets alone, so if for instance the UUID is in the advertisement packet and the name in the scan response, then you will not find both with this approach (this is also the same with the scan module in the nRF5 DK). You would have to put your own logic on top if you need such functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313802?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 03:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5adfc589-a6ef-43f2-b433-a3c80a5ee574</guid><dc:creator>fgeldenh</dc:creator><description>&lt;p&gt;Hi - I have probably not made myself clear enough. I would like to be able to check the UUID and the SCAN NAME of the peripheral each time a&amp;nbsp;scan_filter_match event is called. I have set the scan module not to connect on match. I am trying to find the strongest rssi for a given UUID.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313599?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 10:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a47ec59-717f-4709-bfe0-e75072bd72d2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure exactly what problem you have. If it is about getting&amp;nbsp;some advertising parameter you are not filtering on (like name when filtering on the UUID), then you need to parse the whole advertising packet which you get a pointer to. This is described in the API documentation for the&amp;nbsp;adv_data field in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/bluetooth/scan.html#c.bt_scan_device_info"&gt;bt_scan_device_info&lt;/a&gt;&amp;nbsp;struct: &amp;quot;&lt;em&gt;Received advertising data. If further data processing is needed, you should use bt_data_parse() to get specific advertising data type.&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;If the above is not the problem, then perhaps you can clarify a bit more exactly what you are not able to do, as I am not able to see any specific features you need that are missing based on the description in your initial post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313443?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 13:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c712758-2660-4df3-8b9f-b19ab796e93f</guid><dc:creator>fgeldenh</dc:creator><description>&lt;p&gt;Hi - I have looked at the scanning module documentation in depth and I cannot see how to do the equivalent. I just needed a pointer in the right direction. I am sure it is there, but whwre?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313442?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 13:26:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22a32a1d-c0ae-4450-bc11-4ee5792ea7fc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/bluetooth/scan.html"&gt;Scanning module in the nRF Connect SDK&lt;/a&gt; which&amp;nbsp; scan module in the nRF5 SDK which provide mostly the same functionality as what you are now using from the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_ble_scan.html"&gt;Scanning Module in the nRF5 SDK&lt;/a&gt;. That allows you to filter on both name and UUID, as well as other parameters. You can see examples of it&amp;#39;s usage in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples.html"&gt;Bluetooth central samples in NCS&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313287?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 07:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d07a9cc1-61a4-4ad8-87f0-7b50266a3dea</guid><dc:creator>fgeldenh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;         case NRF_BLE_SCAN_EVT_NOT_FOUND:                       // new case added. Implement ble_advdata.c-&amp;gt;ble_advdata_name_find() type function here
         {
             ble_gap_evt_adv_report_t const * adv_report = p_scan_evt-&amp;gt;params.p_not_found;

              /* Scan encoded adv. payload for data of type BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME */ 
             parsed_len = ble_advdata_search(adv_report-&amp;gt;data.p_data, adv_report-&amp;gt;data.len, &amp;amp;data_offset, BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME);
             
             if (parsed_len != 0)
             {
               /* Name found if parsed_len != 0 */
               p_parsed = &amp;amp;adv_report-&amp;gt;data.p_data[data_offset];
               
               // make sure not besecure
               if (*p_parsed != &amp;#39;B&amp;#39;)
               {
                  data_offset = 0;
                  parsed_len = ble_advdata_search(adv_report-&amp;gt;data.p_data, adv_report-&amp;gt;data.len, &amp;amp;data_offset, BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE);
                  p_parsed = &amp;amp;adv_report-&amp;gt;data.p_data[data_offset];
                  
                  if (parsed_len != 0)
                  {
                    if (memcmp(&amp;amp;bsc_service_uuid, p_parsed, parsed_len)== 0)
                    {
                        if (p_scan_evt-&amp;gt;params.filter_match.p_adv_report-&amp;gt;rssi &amp;gt; scanrssi)
                        {
                          memcpy_fast(&amp;amp;strongest_peer, &amp;amp;p_scan_evt-&amp;gt;params.filter_match.p_adv_report-&amp;gt;peer_addr, 8);
                          scanrssi = p_scan_evt-&amp;gt;params.filter_match.p_adv_report-&amp;gt;rssi;
                          sysStat.found = 1;
                        }
                    }
                  }
               }
              }
         break;
         }
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find name of advertiser</title><link>https://devzone.nordicsemi.com/thread/313285?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 07:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16e222ce-1d4d-4d7d-81a3-be59cb4c9cac</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2806._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>