<?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>How to achieve passive scanning?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63452/how-to-achieve-passive-scanning</link><description>I would like to perform observer role scanning i.e. passive scanning. I am using nRF52832, S132, SDK 15.2.0. I am trying as follows. 
 
 NRF_BLE_SCAN_DEF(m_scan); 
 static ble_gap_scan_params_t m_scan_param = /**&amp;lt; Scan parameters requested for scanning</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Jul 2020 14:45:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63452/how-to-achieve-passive-scanning" /><item><title>RE: How to achieve passive scanning?</title><link>https://devzone.nordicsemi.com/thread/259488?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 14:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cf6f867-3bab-4244-ba53-a856a72950c5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jebakumar&lt;/p&gt;
&lt;p&gt;Is there any reason you commented out the following line:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;//init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That will probably cause issues.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was able to modify the blinky_c example with your settings, and it works fine both with the .active flag cleared or not:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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;

    static ble_gap_scan_params_t m_scan_param = /**&amp;lt; Scan parameters requested for scanning and connection. */
    {
    .active = 0,
    .interval = 160,
    .window = 120,
    .filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .timeout = 0,
    .scan_phys = BLE_GAP_PHY_AUTO,
    .extended = false,
    };

    memset(&amp;amp;init_scan, 0, sizeof(init_scan));

    init_scan.p_scan_param = &amp;amp;m_scan_param;
    init_scan.connect_if_match = true;
    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);

    // 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;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to achieve passive scanning?</title><link>https://devzone.nordicsemi.com/thread/259077?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 06:30:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1217ea5-9008-4dd6-b6ec-02059369bdc3</guid><dc:creator>Jebakumar</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;We use S132 v6.1.1 and SDK v15.2.0.&lt;/p&gt;
&lt;p&gt;My thought is to set active = 0 and so the application will get only the non connectable advertising reports.&lt;/p&gt;
&lt;p&gt;But setting active = 0, no advertising is reported whether it is connectable or non-connectable.&lt;/p&gt;
&lt;p&gt;It is just simple settings but not working as expected.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Jebakumar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to achieve passive scanning?</title><link>https://devzone.nordicsemi.com/thread/258968?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 10:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bd6c0ca-62af-43d5-8949-e4e25462a4f0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you confirm which SoftDevice version you are using?&lt;/p&gt;
&lt;p&gt;We can&amp;#39;t reproduce the issue using SDK v17.0.0 and&amp;nbsp;S132 v7.0.1, your settings work fine, but it might be different in older version of the SoftDevice.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>