<?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>[nRF52832] scan Beacon buffer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55259/nrf52832-scan-beacon-buffer</link><description>hi guys, 
 I was just getting started with Nordic nRF52832, I want to find buffer containing bluetooth scanning data (Beacon) to process but see the examples but can&amp;#39;t see. Can you show me how that function is used 
 thank a lot!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Dec 2019 10:10:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55259/nrf52832-scan-beacon-buffer" /><item><title>RE: [nRF52832] scan Beacon buffer</title><link>https://devzone.nordicsemi.com/thread/224116?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 10:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc1ed49e-0cc0-4ada-b8f7-dfc78631eb99</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You do not say anything about which SDK version or which example you are using, but I will give you an example.&lt;/p&gt;
&lt;p&gt;Starting with the ble_app_blinky_c central application in SDK 16.0.0, you can get the advertising data of scanned devices that do not match the scan filer in&amp;nbsp;scan_evt_handler, using the following code:&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;

    switch(p_scan_evt-&amp;gt;scan_evt_id)
    {
        case NRF_BLE_SCAN_EVT_NOT_FOUND:
            NRF_LOG_INFO(&amp;quot;Received advertising from: %02x:%02x:%02x:%02x:%02x:%02x:%02x&amp;quot;, p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[0], 
                                                                                          p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[1], 
                                                                                          p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[2], 
                                                                                          p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[3], 
                                                                                          p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[4], 
                                                                                          p_scan_evt-&amp;gt;params.p_not_found-&amp;gt;peer_addr.addr[5]);
            break;
        case NRF_BLE_SCAN_EVT_CONNECTING_ERROR:
            err_code = p_scan_evt-&amp;gt;params.connecting_err.err_code;
            APP_ERROR_CHECK(err_code);
            break;
        default:
          break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will print the address of the device that sent the advertising packet. Other beacon data can be accessed through the same struct.&lt;/p&gt;
&lt;p&gt;To avoid that the scanner connects to a BLE blinky device, you must disable the scan filer by commenting out/removing these lines in&amp;nbsp;scan_init():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // Setting filters for scanning.
//    err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_NAME_FILTER, false);
//    APP_ERROR_CHECK(err_code);
//
//    err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_NAME_FILTER, m_target_periph_name);
//    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-185e550c976f46398685f4012d80443e/ble_5F00_app_5F00_beacon_5F00_scanner.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_beacon_5F00_scanner.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>