<?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>scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47480/scanning-with-whitelist-stops-after-one-message-received</link><description>I&amp;#39;m using scannig with whitelist on nRF52840 Dongle SDK V15.2 (usbd_ble_uart_freertos example) 
 when BLE_GAP_EVT_ADV_REPORT is called scanning stops, So it can scan just one message . 
 so each time i restart scanning and resetting the whitelist like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 May 2019 09:32:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47480/scanning-with-whitelist-stops-after-one-message-received" /><item><title>RE: scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/thread/188178?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 09:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cef4bb56-f0c9-4072-9552-496270398107</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What happens if you remove scan_start()? Does the scan-start-function in nrf_ble_scan.c -&amp;gt; case BLE_GAP_EVT_ADV_REPORT get called? If not, why not? Does the function return before it is hit?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/thread/188138?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 08:14:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79fd7b3e-75c0-400e-8773-1408b39411fd</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;in&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_ADV_REPORT case i just printing message mac adresse and rssi ,as shown&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    uint32_t err_code;
    ret_code_t ret;
    ble_gap_evt_t const * p_gap_evt = &amp;amp;p_ble_evt-&amp;gt;evt.gap_evt;
    ble_gap_evt_adv_report_t const * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {   
         case BLE_GAP_EVT_ADV_REPORT:
//          NRF_LOG_INFO(&amp;quot;____________BLE_GAP_EVT_ADV_REPORT__________&amp;quot;);
            scan_start();
            NRF_LOG_INFO(&amp;quot;adresse= %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]
                                       );
            int8_t RSSI = p_adv_report-&amp;gt;rssi ;
            NRF_LOG_INFO(&amp;quot;Rssi =%d &amp;quot;,RSSI);
        break ;
    ...
...&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and i didn&amp;#39;t change anything in&amp;nbsp;nrf_ble_scan.c&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/thread/188104?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:24:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8107725-4b61-433e-bdd9-0559819ca469</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If you add the BLE_GAP_EVT_ADV_REPORT case in ble_evt_handler() it will generate an interrupt in main.c as well as in nrf_ble_scan.c.&lt;/p&gt;
&lt;p&gt;What does your ble_evt_handler&amp;#39;s BLE_GAP_EVT_ADV_REPORT case look like? Do you do any function calls in this event?&lt;/p&gt;
&lt;p&gt;Did you do any changes to nrf_ble_scan.c?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/thread/187983?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 13:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91f3c617-407c-4216-b5fd-5dd7e12d3303</guid><dc:creator>Omar</dc:creator><description>&lt;p&gt;i have added BLE_GAP_EVT_ADV_REPORT case to ble_evt_handler() function, it doesn&amp;#39;t existe in the original code .&lt;/p&gt;
&lt;p&gt;&lt;span&gt;do i need to add&amp;nbsp;nrf_ble_scan_on_adv_report();&amp;nbsp; instead of&amp;nbsp;scan_start(); ??&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning with whitelist stops after one message received</title><link>https://devzone.nordicsemi.com/thread/187959?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 13:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9e4b898-2628-46e0-8f5b-845338cda6fd</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;By default, the scan is stopped every time you get an advertisement. However, the scanning module typically restarts the scanning in the&amp;nbsp;BLE_GAP_EVT_ADV_REPORT in nrf_ble_scan.c. Did you do any changes in that file? It should call nrf_ble_scan_on_adv_report(); which will call&amp;nbsp;sd_ble_gap_scan_start(); in the end (unless it actually decides to connect to the device.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So did you change anything in nrf_ble_scan.c? Alternatively, can you see what&amp;nbsp;sd_ble_gap_scan_start() returns in nrf_ble_scan.c?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>