<?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>Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89230/fatal-error-while-adding-2mbps-phy</link><description>Board: nRF52810 
 SoftDevice: s112 
 SDK version: 17.0.2 
 I&amp;#39;m trying to enable 2Mbps data rate. So I&amp;#39;ve added init.config.ble_adv_primary_phy = BLE_GAP_PHY_2MBPS; in the advertising_init() function. But I&amp;#39;m getting fatal error in advertising_start()</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Aug 2022 09:19:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89230/fatal-error-while-adding-2mbps-phy" /><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/379662?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2022 09:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7a99909-3e68-4228-9411-554aef314aec</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Glad to hear that! Thanks for letting me know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll close the ticket.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/379593?ContentTypeID=1</link><pubDate>Mon, 01 Aug 2022 16:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f50066d3-4b80-4f00-8b8e-cf60bb418789</guid><dc:creator>Nabeel Ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No worries, I&amp;#39;ve solved the problem.&lt;/p&gt;
&lt;p&gt;Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/379516?ContentTypeID=1</link><pubDate>Mon, 01 Aug 2022 11:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f76eb48b-e0e1-4fd3-b46c-52cc8997fa3b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry about the delayed response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been out of office for quite some time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you resolve your issue, or do you still need assistance on this?&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374666?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 07:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f1a8c8-8435-40bb-9975-fd9cc24d5cf6</guid><dc:creator>Nabeel Ar</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve changed the code to update PHY after connection establishment and did the same in central too.&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m getting Fatal error after connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How to find which PHY I&amp;#39;m currently using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374609?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 17:15:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06551de0-d6ef-41fd-b0c5-0b05b6fea072</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;I think you are getting the error because you are trying to advertise on 2mbps.&lt;/p&gt;
&lt;p&gt;Maybe you can try to advertise on 1mbps and when the connection is established, you can request a phy update and change to 2mbps for the connection.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374260?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 06:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c04f633e-460a-4c8e-93b3-7c8a4035b1de</guid><dc:creator>Nabeel Ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for sharing. But I still can&amp;#39;t understand why I&amp;#39;m getting fatal error.&lt;/p&gt;
&lt;p&gt;I have few questions.&lt;/p&gt;
&lt;p&gt;By enabling 2Mbps PHY, where will the transfer speed increase, In an advertisement or in data transfer?&lt;/p&gt;
&lt;p&gt;Is there any example in the SDK with 2Mbps enabled in it?&lt;/p&gt;
&lt;p&gt;TIA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374084?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 09:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:640d5c6e-ecf1-461e-a186-31ab91724b92</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Please check out this previous ticket:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47222/advertize-and-scan-only-on-2m-phy"&gt;Advertize and scan only on 2M PHY&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374046?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 05:26:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96e0bfab-52f7-43d3-9d43-7fe5be0dbaa0</guid><dc:creator>Nabeel Ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No worries.&lt;/p&gt;
&lt;p&gt;This is my ble_advertising_start() function&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t ble_advertising_start(ble_advertising_t * const p_advertising,
                               ble_adv_mode_t            advertising_mode)
{
    uint32_t ret;

    if (p_advertising-&amp;gt;initialized == false)
    {
        return NRF_ERROR_INVALID_STATE;
    }

    p_advertising-&amp;gt;adv_mode_current = advertising_mode;

    memset(&amp;amp;p_advertising-&amp;gt;peer_address, 0, sizeof(p_advertising-&amp;gt;peer_address));

    if (  ((p_advertising-&amp;gt;adv_modes_config.ble_adv_directed_high_duty_enabled) &amp;amp;&amp;amp; (p_advertising-&amp;gt;adv_mode_current == BLE_ADV_MODE_DIRECTED_HIGH_DUTY))
        ||((p_advertising-&amp;gt;adv_modes_config.ble_adv_directed_enabled)           &amp;amp;&amp;amp; (p_advertising-&amp;gt;adv_mode_current == BLE_ADV_MODE_DIRECTED_HIGH_DUTY))
        ||((p_advertising-&amp;gt;adv_modes_config.ble_adv_directed_enabled)           &amp;amp;&amp;amp; (p_advertising-&amp;gt;adv_mode_current == BLE_ADV_MODE_DIRECTED))
       )
    {
        if (p_advertising-&amp;gt;evt_handler != NULL)
        {
            p_advertising-&amp;gt;peer_addr_reply_expected = true;
            p_advertising-&amp;gt;evt_handler(BLE_ADV_EVT_PEER_ADDR_REQUEST);
        }
        else
        {
            p_advertising-&amp;gt;peer_addr_reply_expected = false;
        }
    }

    p_advertising-&amp;gt;adv_mode_current = adv_mode_next_avail_get(p_advertising, advertising_mode);

    // Fetch the whitelist.
    if ((p_advertising-&amp;gt;evt_handler != NULL) &amp;amp;&amp;amp;
        (p_advertising-&amp;gt;adv_mode_current == BLE_ADV_MODE_FAST || p_advertising-&amp;gt;adv_mode_current == BLE_ADV_MODE_SLOW) &amp;amp;&amp;amp;
        (p_advertising-&amp;gt;adv_modes_config.ble_adv_whitelist_enabled) &amp;amp;&amp;amp;
        (!p_advertising-&amp;gt;whitelist_temporarily_disabled))
    {
        p_advertising-&amp;gt;whitelist_in_use         = false;
        p_advertising-&amp;gt;whitelist_reply_expected = true;
        p_advertising-&amp;gt;evt_handler(BLE_ADV_EVT_WHITELIST_REQUEST);
    }
    else
    {
        p_advertising-&amp;gt;whitelist_reply_expected = false;
    }

    // Initialize advertising parameters with default values.
    memset(&amp;amp;p_advertising-&amp;gt;adv_params, 0, sizeof(p_advertising-&amp;gt;adv_params));

    p_advertising-&amp;gt;adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;

    // Use 1MBIT as primary phy if no phy was selected.
    if (phy_is_valid(&amp;amp;p_advertising-&amp;gt;adv_modes_config.ble_adv_primary_phy))
    {
        p_advertising-&amp;gt;adv_params.primary_phy = p_advertising-&amp;gt;adv_modes_config.ble_adv_primary_phy;
    }
    else
    {
        p_advertising-&amp;gt;adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
    }

    if (p_advertising-&amp;gt;adv_modes_config.ble_adv_extended_enabled)
    {
        // Use 1MBIT as secondary phy if no phy was selected.
        if (phy_is_valid(&amp;amp;p_advertising-&amp;gt;adv_modes_config.ble_adv_secondary_phy))
        {
            p_advertising-&amp;gt;adv_params.secondary_phy = p_advertising-&amp;gt;adv_modes_config.ble_adv_secondary_phy;
        }
        else
        {
            p_advertising-&amp;gt;adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
        }
    }
    p_advertising-&amp;gt;adv_params.filter_policy = BLE_GAP_ADV_FP_ANY;

    // Set advertising parameters and events according to selected advertising mode.
    switch (p_advertising-&amp;gt;adv_mode_current)
    {
        case BLE_ADV_MODE_DIRECTED_HIGH_DUTY:
            ret = set_adv_mode_directed_high_duty(p_advertising, &amp;amp;p_advertising-&amp;gt;adv_params);
            break;

        case BLE_ADV_MODE_DIRECTED:
            ret = set_adv_mode_directed(p_advertising, &amp;amp;p_advertising-&amp;gt;adv_params);
            break;

        case BLE_ADV_MODE_FAST:
            ret = set_adv_mode_fast(p_advertising, &amp;amp;p_advertising-&amp;gt;adv_params);
            break;

        case BLE_ADV_MODE_SLOW:
            ret = set_adv_mode_slow(p_advertising, &amp;amp;p_advertising-&amp;gt;adv_params);
            break;

        case BLE_ADV_MODE_IDLE:
            p_advertising-&amp;gt;adv_evt = BLE_ADV_EVT_IDLE;
            break;

        default:
            break;
    }

    if (p_advertising-&amp;gt;adv_mode_current != BLE_ADV_MODE_IDLE)
    {

        ret = sd_ble_gap_adv_set_configure(&amp;amp;p_advertising-&amp;gt;adv_handle, p_advertising-&amp;gt;p_adv_data, &amp;amp;p_advertising-&amp;gt;adv_params);
        if (ret != NRF_SUCCESS)
        {
            return ret;
        }
        ret = sd_ble_gap_adv_start(p_advertising-&amp;gt;adv_handle, p_advertising-&amp;gt;conn_cfg_tag);

        if (ret != NRF_SUCCESS)
        {
            return ret;
        }
    }

    if (p_advertising-&amp;gt;evt_handler != NULL)
    {
        p_advertising-&amp;gt;evt_handler(p_advertising-&amp;gt;adv_evt);
    }

    return NRF_SUCCESS;
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/374020?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 17:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feb7980e-1f21-4313-beea-6880ce83324f</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Maybe you could also upload the ble_advertising_start() function? &lt;br /&gt;That was the function I was looking for. Sorry for the confusion.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/373885?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 09:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c94bb60-ca64-48bb-b652-1f09b2881043</guid><dc:creator>Nabeel Ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m just getting Fatal error msg.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my advertising_start() function.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_start(void)
{
    uint32_t err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error while adding 2Mbps PHY</title><link>https://devzone.nordicsemi.com/thread/373760?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2022 15:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c48841da-5cbf-4563-a90c-f7d7a772baaf</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you upload your entire advertising start() function?&lt;/p&gt;
&lt;p&gt;Do you have an error code from when it fails?&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>