<?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>nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49295/nrf52840-stops-scanning</link><description>Hi. 
 We have a strange issue we are seeing with a nRF52840 where scanning fails, but it is very rare. 
 Setup - nRF52840 is a central device, and there are 20 x nRF52832&amp;#39;s peripherals advertising. The central reports the status of all the peripherals</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Aug 2019 15:17:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49295/nrf52840-stops-scanning" /><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/203657?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 15:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edfbeb06-c2a0-46ff-b74e-baa1bbd8d939</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help. Let me know if you run into any issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/203627?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 13:56:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f061d35a-5412-4c79-91eb-0f643f0d25b0</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks Bjorn, I will give that a go.&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/203614?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 13:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d912981a-9de6-4750-b9c3-69107d366886</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Phil,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The status field should be a member of the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.0/structble__gap__adv__report__type__t.html"&gt;ble_gap_adv_report_type_t&lt;/a&gt;&amp;nbsp;&lt;span&gt;struct&lt;/span&gt;which in turn is a member of the ble_gap_evt_adv_report_t struct in S140 v6.x.x, see&amp;nbsp;&lt;a title="nRF52 Series" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.0/structble__gap__evt__adv__report__t.html?resultof=%22%42%4c%45%5f%47%41%50%5f%41%44%56%5f%44%41%54%41%5f%53%54%41%54%55%53%5f%49%4e%43%4f%4d%50%4c%45%54%45%5f%4d%4f%52%45%5f%44%41%54%41%22%20"&gt;S140 SoftDevice v6.1.0: ble_gap_evt_adv_report_t Struct Reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I think it should be&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        case BLE_GAP_EVT_ADV_REPORT:
            on_adv_report(&amp;amp;p_gap_evt-&amp;gt;params.adv_report);

            if(p_gap_evt-&amp;gt;params.adv_report.type.status == BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA)
            {
                start_scan();
            }
            break;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/203590?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 12:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d3b0070-8691-4bfc-839f-780e7be3cf34</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi Bjorn.&lt;/p&gt;
&lt;p&gt;Am looking at the last case in your message above. Can&amp;#39;t work out how I check the status part of the ADV_REPORT. Can&amp;#39;t find &amp;#39;status&amp;#39; in there??&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case BLE_GAP_EVT_ADV_REPORT:
            on_adv_report(&amp;amp;p_gap_evt-&amp;gt;params.adv_report);

            if(p_gap_evt-&amp;gt;params.adv_report.?????? == BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA)
            {
                start_scan();
            }
            break;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/197951?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 21:15:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a346854-6d58-451e-a6b1-7dfd3accb1eb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;It could be the last case, i.e the status bit is set to BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. However, if the workaround solves the issue then I guess we can mark the case as solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196944?ContentTypeID=1</link><pubDate>Sat, 06 Jul 2019 13:36:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7283976c-c40c-4922-ae58-5d20068eea47</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Oh I found it. Its set to 0x0000 so no timeout. Must be a glitch that happens with the softdevice sometimes.&lt;/p&gt;
&lt;p&gt;My workaround should be ok.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196943?ContentTypeID=1</link><pubDate>Sat, 06 Jul 2019 13:34:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0b44096-e276-4391-b3dc-a6e29433e2ae</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;span&gt;Bj&amp;oslash;rn.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only one of those cases that could be happening is the timeout, but I can&amp;#39;t figure out where that would be set in my project. I searched the whole project (based on multi-link&amp;nbsp;central) for &amp;quot;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___t_i_m_e_o_u_t___s_o_u_r_c_e_s.html#ga21e47e99c7d0a1fa0ed70c7c4c5b5228"&gt;BLE_GAP_TIMEOUT_SRC_SCAN&lt;/a&gt;&amp;quot; and found nothing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Phil&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196909?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 19:31:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75227dc3-446c-4757-83c4-a3873d5ac140</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Phillip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy to hear that restarting scanning solves the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the SoftDevice API documentation of&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gabbd87dea8f218d2a7e12c40cfbc6a7d2"&gt;sd_ble_gap_scan_start&lt;/a&gt;&amp;nbsp;scanning&amp;nbsp;&lt;span&gt;will automatically stop in the following cases:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#ga0e92b62656057a13747a2ef1e71fd128"&gt;sd_ble_gap_scan_stop&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is called.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gacca0e56084c7b3ed832b1bfa3911b7fe"&gt;sd_ble_gap_connect&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is called.&lt;/li&gt;
&lt;li&gt;A&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___e_n_u_m_e_r_a_t_i_o_n_s.html#ggada486dd3c0cce897b23a887bed284fefa57e5d1061d9b3d1500fb3556a3fb8847"&gt;BLE_GAP_EVT_TIMEOUT&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;with source set to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___t_i_m_e_o_u_t___s_o_u_r_c_e_s.html#ga21e47e99c7d0a1fa0ed70c7c4c5b5228"&gt;BLE_GAP_TIMEOUT_SRC_SCAN&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is received.&lt;/li&gt;
&lt;li&gt;When a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___e_n_u_m_e_r_a_t_i_o_n_s.html#ggada486dd3c0cce897b23a887bed284fefa41ba498a9fda3e1cd345f4454a582bd9"&gt;BLE_GAP_EVT_ADV_REPORT&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;event is received and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/structble__gap__adv__report__type__t.html#a9c75def4d2cba76b50d25210c0c30e30"&gt;ble_gap_adv_report_type_t::status&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is not set to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___a_d_v___d_a_t_a___s_t_a_t_u_s.html#ga181c51cd6fedafe2430e400744be8a0c"&gt;BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA&lt;/a&gt;. In this case scanning is only paused to let the application access received data. The application must call this function to continue scanning, or call&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#ga0e92b62656057a13747a2ef1e71fd128"&gt;sd_ble_gap_scan_stop&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to stop scanning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196884?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 15:05:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3c6c711-2c59-47e4-a488-3c72cf9c9114</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks Guys.&lt;/p&gt;
&lt;p&gt;I added a command to restart scanning when the issue occurs. It did happen again the other day and restarting scanning solved the issue.&lt;/p&gt;
&lt;p&gt;However I still don&amp;#39;t understand why it would stop or timeout, after a random period of time. Makes no sense. There is no scanning timeout set in my project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196866?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 13:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:592748a4-f917-488e-b60f-9d71775e9c78</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Philip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, we added a &lt;a title="Scanning Module" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_ble_scan.html?cp=5_5_0_3_2_11"&gt;Scanning Module&lt;/a&gt; in SDK v15.2.0. In SDK v15.0.0 you can monitor the underlying events that is abstracted by the scanning module. The&amp;nbsp;BLE_GAP_EVT_TIMEOUT event will be sent with&amp;nbsp;the field params.timeout.src set to&amp;nbsp;&lt;span&gt;BLE_GAP_TIMEOUT_SRC_SCAN(0x01), so you can check for this in the&amp;nbsp;ble_evt_handler() in main.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        case BLE_GAP_EVT_TIMEOUT:
        {
            // Check if scaning times out
            if (p_gap_evt-&amp;gt;params.timeout.src == BLE_GAP_TIMEOUT_SRC_SCAN)
            {
                NRF_LOG_DEBUG(&amp;quot;Scanning timed out.&amp;quot;);
            }
        } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196339?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 18:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63b9b1ad-44a2-44a8-b726-fe93a58c4438</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Actually in the multi-link central SDK15.0.0 I am using there is no scan_init or scan_evt_handler? Must have been added in SDK15.2.0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Phil&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196337?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 18:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa4f5576-df60-4cce-affd-16a423d7b52a</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hmm, thanks for the suggestion sounds good.&lt;/p&gt;
&lt;p&gt;I will give it a try and monitor the events.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196336?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 18:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd95b72a-ecab-435f-b10a-2519275a0dd6</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I find tracing all the scanning events helpful, something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Scan Events
static char * ble_scan_event_description[] =
{
/* NRF_BLE_SCAN_EVT_FILTER_MATCH&amp;quot;,        */ &amp;quot; 0 Filter matched in the multifilter mode&amp;quot;,
/* NRF_BLE_SCAN_EVT_WHITELIST_REQUEST:    */ &amp;quot; 1 Request the whitelist from the main application&amp;quot;,
/* NRF_BLE_SCAN_EVT_WHITELIST_ADV_REPORT: */ &amp;quot; 2 Device from the whitelist is found&amp;quot;,
/* NRF_BLE_SCAN_EVT_NOT_FOUND:            */ &amp;quot; 3 Filter not matched for the scan data&amp;quot;,
/* NRF_BLE_SCAN_EVT_SCAN_TIMEOUT:         */ &amp;quot; 4 Scan timeout&amp;quot;,
/* NRF_BLE_SCAN_EVT_SCAN_REQ_REPORT:      */ &amp;quot; 5 Scan request report&amp;quot;,
/* NRF_BLE_SCAN_EVT_CONNECTING_ERROR:     */ &amp;quot; 6 Error occurred when establishing the connection from sd_ble_gap_connect&amp;quot;,
/* NRF_BLE_SCAN_EVT_CONNECTED:            */ &amp;quot; 7 Connected to device&amp;quot;
};
#define NUM_BLE_SCAN_EVENTS (sizeof(ble_scan_event_description)/sizeof(ble_scan_event_description[0]))

/**@brief Function for handling Scanning Module events.
 */
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_CONNECTING_ERROR:     // Error occurred when establishing the connection. In this event, an error is passed from the function call @ref sd_ble_gap_connect
         {
              err_code = p_scan_evt-&amp;gt;params.connecting_err.err_code;
              APP_ERROR_CHECK(err_code);
         } break;

         case NRF_BLE_SCAN_EVT_CONNECTED:            // Connected to device
         {
             ble_gap_evt_connected_t const * p_connected = p_scan_evt-&amp;gt;params.connected.p_connected;
             // Scan is automatically stopped by the connection.
             NRF_LOG_INFO(&amp;quot;Connect to Id %02x%02x%02x%02x%02x%02x&amp;quot;,
                      p_connected-&amp;gt;peer_addr.addr[0],
                      p_connected-&amp;gt;peer_addr.addr[1],
                      p_connected-&amp;gt;peer_addr.addr[2],
                      p_connected-&amp;gt;peer_addr.addr[3],
                      p_connected-&amp;gt;peer_addr.addr[4],
                      p_connected-&amp;gt;peer_addr.addr[5]
                      );
         } break;

         case NRF_BLE_SCAN_EVT_SCAN_TIMEOUT:         // Scan timeout
         {
             NRF_LOG_INFO(&amp;quot;Scan timed out.&amp;quot;);
             scan_start();
         } break;

         case NRF_BLE_SCAN_EVT_FILTER_MATCH:         // A filter is matched or all filters are matched in the multifilter mode
             {
               ble_gap_evt_adv_report_t const *p_adv_report = p_scan_evt-&amp;gt;params.filter_match.p_adv_report;
               NRF_LOG_INFO(&amp;quot;Scan Match Id: %02x%02x%02x%02x%02x%02x&amp;quot;,
                      p_adv_report-&amp;gt;peer_addr.addr[0],
                      p_adv_report-&amp;gt;peer_addr.addr[1],
                      p_adv_report-&amp;gt;peer_addr.addr[2],
                      p_adv_report-&amp;gt;peer_addr.addr[3],
                      p_adv_report-&amp;gt;peer_addr.addr[4],
                      p_adv_report-&amp;gt;peer_addr.addr[5]
                      );
             }
             break;

         case NRF_BLE_SCAN_EVT_NOT_FOUND:            // The filter was not matched for the scan data
             {
               ble_gap_evt_adv_report_t const *p_not_found = p_scan_evt-&amp;gt;params.p_not_found;
               NRF_LOG_INFO(&amp;quot;Deny Id: %02x%02x%02x%02x%02x%02x&amp;quot;,
                      p_not_found-&amp;gt;peer_addr.addr[0],
                      p_not_found-&amp;gt;peer_addr.addr[1],
                      p_not_found-&amp;gt;peer_addr.addr[2],
                      p_not_found-&amp;gt;peer_addr.addr[3],
                      p_not_found-&amp;gt;peer_addr.addr[4],
                      p_not_found-&amp;gt;peer_addr.addr[5]
                      );
             }
             break;

         default:
//       case NRF_BLE_SCAN_EVT_FILTER_MATCH:         // A filter is matched or all filters are matched in the multifilter mode
         case NRF_BLE_SCAN_EVT_WHITELIST_REQUEST:    // Request the whitelist from the main application. For whitelist scanning to work, the whitelist must be set when this event occurs
         case NRF_BLE_SCAN_EVT_WHITELIST_ADV_REPORT: // Send notification to the main application when a device from the whitelist is found
//       case NRF_BLE_SCAN_EVT_NOT_FOUND:            // The filter was not matched for the scan data
         case NRF_BLE_SCAN_EVT_SCAN_REQ_REPORT:      // Scan request report
            if (p_scan_evt-&amp;gt;scan_evt_id &amp;lt; NUM_BLE_SCAN_EVENTS)
            {
               NRF_LOG_INFO(&amp;quot;scan_evt_id: %d %s&amp;quot;, p_scan_evt-&amp;gt;scan_evt_id, ble_scan_event_description[p_scan_evt-&amp;gt;scan_evt_id]);
            }
            else
            {
               NRF_LOG_INFO(&amp;quot;Unhandled scan_evt_id: %d&amp;quot;, p_scan_evt-&amp;gt;scan_evt_id);
            }
             break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Selectively enable/disable the event reports, but ensure everything generates a trace in case something wierd happes .. if any event happens that is ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196335?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 18:02:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85139c2-6d26-4490-ab26-3258867f9d61</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Bj&amp;oslash;rn.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When it has had the problem it is only scanning, it is not connected to any of the nRF52832 devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What could cause the scanning to randomly stop?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I could add a watchdog timer, but would be better to figure out what the issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there any variables / functions I can monitor regarding scanning that I could log? e.g. is there a function that tells you if scanning is running, or has failed?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Phil&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 stops scanning</title><link>https://devzone.nordicsemi.com/thread/196239?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 11:13:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88de24ed-279b-4dcb-a79c-9e6053ea091a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Phillip,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;The system can be running fine like this for 1 / 2 weeks 24 hours a day, then out of the blue the nRF52840 stops picking up any peripherals. It could be in the middle of the night, when the system isn&amp;#39;t doing anything complicated like connecting / mass data transfer etc.&lt;/p&gt;
&lt;p&gt;The fact that all the peripherals &amp;#39;disappear&amp;#39; at the same time suggests the central is at fault. The peripherals have all been started at different times and have power etc.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It sounds like the nRF52840 stops scanning. Is the nRF52840 only scanning for the nRF52832 devices or or is it connected to all the nRF52832 devices? You could start a &amp;quot;watchdog&amp;quot; timer that is reset every time you receive an advertisment packet from one of the nRF52832 devices. If the timer times out, then you can call the SD-api to restart scanning.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you log any debug information through the CDC USB interface?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>