<?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>Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78968/scan-request-with-extended-advertising</link><description>Hi, 
 I&amp;#39;m trying to send and receive scan request/scan response. The system consists of 2 nrf52840, 1 central and 1 peripheral. They both advertise and scan on 1M and coded PHY alternately. 
 I&amp;#39;m trying to get the central to send out a scan request, but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 28 Aug 2021 00:07:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78968/scan-request-with-extended-advertising" /><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/327049?ContentTypeID=1</link><pubDate>Sat, 28 Aug 2021 00:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d51ff5c9-f7f0-4a64-8e5a-1d65e1d3e629</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Found another thread with similar problem.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/78332/slave-send-extended-broadcast-packet-will-protocol-stack-report-event-when-the-master-receive-the-auxiliary-broadcast-package-and-what-event-is-reported-how-do-the-slave-know-that-the-auxiliary-broadcast-packet-has-been-recei/324420#324420"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/78332/slave-send-extended-broadcast-packet-will-protocol-stack-report-event-when-the-master-receive-the-auxiliary-broadcast-package-and-what-event-is-reported-how-do-the-slave-know-that-the-auxiliary-broadcast-packet-has-been-recei/324420#324420&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just had to change the property type in ble_advertising_start() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/327031?ContentTypeID=1</link><pubDate>Fri, 27 Aug 2021 15:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7e69d45-8075-4ece-89b3-0a911f5b5742</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Simon,&lt;/p&gt;
&lt;p&gt;My peripheral device does not have high duty advertising. I have clean and rebuilt the project, as well as erase the chip before programming.&amp;nbsp; Peripheral still does not receive notification for scan request.&lt;/p&gt;
&lt;p&gt;Any other suggestions as to why it is advertising in nonscannable?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ken&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/327003?ContentTypeID=1</link><pubDate>Fri, 27 Aug 2021 13:09:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31e57f9e-4b32-41e0-b604-e8630f7c0ebf</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry, I should have mentioned the nRF Sniffer to you in my reply. The fact that the device still advertises in &amp;quot;NONSCANNABLE&amp;quot; is likely why you&amp;#39;re seeing this issue. Are you perhaps calling set_adv_mode_directed_high_duty() somewhere in your application, as that will cause the device to advertise in a &amp;quot;NONSCANNABLE&amp;quot; state. Maybe you haven&amp;#39;t compiled and built the peripheral project after you changed the application to use SCANNABLE advertising.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/326867?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 21:24:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b5c62d3-48eb-46d3-9861-c2e072b4632d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Simon,&lt;/p&gt;
&lt;p&gt;I managed to get the sniffer going using one of the DK I have.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1630013057159v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;PDU type is 0011, which seems to be scan request, correct?&lt;/p&gt;
&lt;p&gt;A sniff on peripheral adv package for coded PHY&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1630019575906v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In extended advertising header, it indicates advertising mode as &amp;quot;Connectable Non-scannable&amp;quot; even though advertising property type is set to&amp;nbsp;BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED.&amp;nbsp; Correct me if I&amp;#39;m wrong, but scannable means it is able to receive scan request.&amp;nbsp; I&amp;#39;m not sure why advertising header is showing non-scannable.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ken&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/326843?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 15:20:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c557b459-c734-4da0-b021-d13eccc07445</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(uint8_t phy)
{
    ret_code_t             err_code;
    static ble_advdata_manuf_data_t manuf_specific_data;
    static ble_advdata_manuf_data_t srsp_manuf_specific_data;

    manuf_specific_data.company_identifier = COMPANY_IDENTIFIER;
    srsp_manuf_specific_data.company_identifier = COMPANY_IDENTIFIER;

    memset(&amp;amp;init, 0, sizeof(init));

    manuf_specific_data.data.p_data = (uint8_t *) m_srespons_info;
    manuf_specific_data.data.size   = APP_SRESPONSE_INFO_LENGTH;
    srsp_manuf_specific_data.data.p_data = (uint8_t *) m_srespons_info;
    srsp_manuf_specific_data.data.size = APP_SRESPONSE_INFO_LENGTH;

    init.advdata.name_type               = BLE_ADVDATA_NO_NAME;
    init.advdata.include_appearance      = false;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.advdata.p_manuf_specific_data = &amp;amp;manuf_specific_data;
//    init.srdata.p_manuf_specific_data = &amp;amp;srsp_manuf_specific_data;
//    init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
//    init.advdata.uuids_complete.p_uuids  = m_adv_uuids;
    if(phy == BLE_GAP_PHY_CODED)
    {
        m_advertising.adv_params.primary_phy = BLE_GAP_PHY_CODED;
        m_advertising.adv_params.secondary_phy = BLE_GAP_PHY_CODED;
    }
    else 
    {
        m_advertising.adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
        m_advertising.adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
    }
//    m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED;
    m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED;
//    m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
    m_advertising.adv_params.scan_req_notification = 1;
    m_advertising.adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
    m_advertising.adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_advertising.adv_params.interval        = APP_ADV_INTERVAL;
    m_advertising.adv_params.duration        = APP_ADV_DURATION_UNLIMITED;       // Timeout after 60 s
    m_advertising.adv_params.channel_mask[4] = 0x00;

    init.config.ble_adv_whitelist_enabled = true;
    init.config.ble_adv_fast_enabled  = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;
    init.config.ble_adv_slow_enabled = true;
    init.config.ble_adv_slow_interval = APP_SLOW_ADV_INTERVAL;
    init.config.ble_adv_slow_timeout = APP_SLOW_ADV_DURATION;
    init.config.ble_adv_extended_enabled = true;
    if(phy == BLE_GAP_PHY_CODED)
    {
        init.config.ble_adv_primary_phy = BLE_GAP_PHY_CODED;
        init.config.ble_adv_secondary_phy = BLE_GAP_PHY_CODED;
    }
    else
    {
        init.config.ble_adv_primary_phy = BLE_GAP_PHY_1MBPS;
        init.config.ble_adv_secondary_phy = BLE_GAP_PHY_1MBPS;
    }


    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);

    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, TX_POWER_LEVEL);
    APP_ERROR_CHECK(err_code);
}


#define APP_ADV_INTERVAL                320                       /**&amp;lt; The advertising interval (in units of 0.625 ms. This value corresponds to 150 ms). */
#define APP_ADV_DURATION_UNLIMITED      0                                           /**&amp;lt; Unlimited period .*/
#define APP_ADV_DURATION                2000                         /**&amp;lt; The advertising duration (60 seconds) in units of 10 milliseconds. */
#define APP_SLOW_ADV_INTERVAL           2400                  /**&amp;lt; The advertising interval (in units of 0.625 ms. This value corresponds to 2000 ms). */
#define APP_SLOW_ADV_DURATION           2000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a BLE sniffer.&amp;nbsp; Is there another method of checking central&amp;#39;s scan request message?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ken&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan request with extended advertising</title><link>https://devzone.nordicsemi.com/thread/326748?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 11:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a7581b0-83fc-4a40-880f-a500024c0830</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you also show me the advertising parameters, in the&amp;nbsp;scan_req_notification define, it is stated that this parameter is ignored if ble_gap_adv_properties is set to a non-scannable advertising type.&lt;/p&gt;
&lt;p&gt;You can also take a sniffer trace to check whether a scan request is actually sent by the central device.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>