<?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>BLE unable to connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50580/ble-unable-to-connect</link><description>Hi, I am using the nRF connect app to test the BLE function on my code. I am able to scan the device and Service UUIDs just fine. However, when I click on the &amp;quot;connect&amp;quot; button, the status shows &amp;quot;connecting&amp;quot; but it never gets connected. 
 In my main, I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Jan 2021 02:05:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50580/ble-unable-to-connect" /><item><title>RE: BLE unable to connect</title><link>https://devzone.nordicsemi.com/thread/288501?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2021 02:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a98c8b9-d780-402c-aaf9-93d6c9b1161b</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;I am seeing a similar behavior when trying to connect to my peripheral device via nRF Connect on an Android phone. &lt;/p&gt;
&lt;p&gt;My set up:&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDK 15.3.0, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SD version 6.1.1,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nRF52832&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE unable to connect</title><link>https://devzone.nordicsemi.com/thread/202799?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 11:00:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91619568-4b01-4b00-96a2-980317d8b36a</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="chkan"]The connection doesn&amp;#39;t fail but it appearing to be connecting for a long time but it never gets connected. [/quote]
&lt;p&gt;Do you get the BLE_GAP_EVT_CONNECTED event, and h&lt;span&gt;ow do you handle ble connection events in the ble handler? A sniffer trace of the connection&amp;nbsp;would clarify what really happens. Could you take a &lt;a href="https://infocenter.nordicsemi.com/topic/struct_nrftools/struct/nrftools_nrfsniffer.html?cp=6_4"&gt;nrf sniffer trace&lt;/a&gt; of the connection and upload it here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE unable to connect</title><link>https://devzone.nordicsemi.com/thread/202484?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2019 16:39:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6a537bd-d28d-40d6-b530-fea26c979a0b</guid><dc:creator>KCY</dc:creator><description>&lt;p&gt;It is advertising in fast mode. I have the advertising_init() and&amp;nbsp;advertising_init() shown below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    ret_code_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      = true;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    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.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);
}


static void advertising_start(void * p_erase_bonds)
{
    bool erase_bonds = *(bool*)p_erase_bonds;

    if (erase_bonds)
    {
        delete_bonds();
        // Advertising is started by PM_EVT_PEERS_DELETE_SUCCEEDED event.
    }
    else
    {
        ret_code_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;p&gt;&lt;/p&gt;
&lt;p&gt;The connection doesn&amp;#39;t fail but it appearing to be connecting for a long time but it never gets connected. This is the log after I cancel the connection manually.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_2773.jpg" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE unable to connect</title><link>https://devzone.nordicsemi.com/thread/202319?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2019 07:32:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da4ee3e1-25de-4f75-9a93-931e9ad192c6</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What mode is the peripheral advertising in? What error is shown in the nRF Connect log when connection establishment fails?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>