<?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>CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56971/coded-phy-using-the-ble-advertising-module---invalid-params</link><description>Hi! I&amp;#39;m using S140 and I&amp;#39;m using the ble_advertising module to set up advertising. 
 This is my advertising_init function which is working properly until I uncomment the enabling of the extended advertising. When executing advertising_start, an INVALID_PARAMS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Mar 2020 19:26:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56971/coded-phy-using-the-ble-advertising-module---invalid-params" /><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/238940?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 19:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c57cb1a-de4d-458c-897f-dc8d76674746</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;This looks good to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/238621?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 20:31:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9018e38-29dc-4d31-8434-9515615f8d0c</guid><dc:creator>kunal1234</dc:creator><description>&lt;p&gt;With SDK 16.0.0 &amp;amp; nRF52840 DK, in ble_app_uart example,&amp;nbsp;does this advertising_init() enable CODED PHY ? &lt;br /&gt;No other code changes. I made these changes by looking at older posts in the devzone. My program does not crash(no Assert) and I don&amp;#39;t see this peripheral device when I scan for BLE devices on my phone, as expected. I want to make sure if these changes are enough to use Coded PHY on peripheral.&lt;br /&gt;&lt;br /&gt;I am yet to edit ble_app_uart_c program to flash on another nRF52840 DK&amp;nbsp; to scan and connect with this peripheral.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = false;
 // init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
        init.advdata.flags              =BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

 //   init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]); // no scan response in Coded PHY
 //   init.srdata.uuids_complete.p_uuids  = m_adv_uuids;
        init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.advdata.uuids_complete.p_uuids  = m_adv_uuids;

    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_primary_phy       = BLE_GAP_PHY_CODED;  // use Coded PHY
            init.config.ble_adv_secondary_phy     = BLE_GAP_PHY_CODED;
            init.config.ble_adv_extended_enabled  = true;               // Coded PHY needs extended adv (bigger adv packet size)
    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);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/231096?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 11:45:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be7c3f30-92ef-4c06-888e-3c8f5964b1c1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for letting us know. That makes sense. It is not legal for extended advertisement packets to be scannable &lt;em&gt;and&lt;/em&gt; connectable. You can see this from&amp;nbsp;BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 6, Part B, Section 2.3.4&amp;nbsp;Common Extended Advertising Payload Format.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/230924?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 16:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a86e64e7-e850-4625-bb57-216abbd6d090</guid><dc:creator>Ivan Herrera</dc:creator><description>&lt;p&gt;UPDATE: Removing the scan-response data did the trick! Any ideas as to why? (I&amp;nbsp;commented the 2 lines adding the UUID&amp;#39;s to the SR).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/230919?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 15:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99c11871-f20d-4f33-85a9-ae6f9e44796e</guid><dc:creator>Ivan Herrera</dc:creator><description>&lt;p&gt;Hi! Thanks for your swift response! Yes, I mentioned that in my initial post. The error is coming from adv_set_configure() but it&amp;#39;s happening even with GAP_PHY_CODED disabled and adv_extended_enabled set to true, so it&amp;#39;s definitely the advertising extensions causing the INVALID_PARAMS error. Is there anything else I need to look for? Does the length of the advertising data change? Do I need to change something in SDK_CONFIG?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On a different note, I was able to enable coded PHY on the secondary PHY so at least that&amp;#39;s working :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CODED PHY using the BLE Advertising module - INVALID PARAMS</title><link>https://devzone.nordicsemi.com/thread/230916?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 15:26:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6a3e9d1-591b-48aa-9e76-faee4629b6c1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;span&gt;INVALID_PARAMS&amp;nbsp;error&amp;nbsp;&lt;/span&gt;is probably returned from the sd_ble_gap_adv_set_configure() called from&amp;nbsp;ble_advertising_start(). You will get&amp;nbsp;INVALID_PARAMS if you set configure the primary PHY as BLE_GAP_PHY_CODED, and disable advertising extension. This is because it is an illegal configuration which is not allowed by the SoftDevice. So the fix is to enable advertising extensions. (Note that you can use coded PHY on the secondary PHY without extended advertising, but not on the primary PHY.)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>