<?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_gap error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16381/ble_gap-error</link><description>I am getting an error on a connection via the ble nus service that is causing me to scratch my head. If I suppress the error the connection seems fine and I don&amp;#39;t notice any problems, but I&amp;#39;m concerned I might be creating a problem for myself down the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Sep 2016 13:06:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16381/ble_gap-error" /><item><title>RE: ble_gap error</title><link>https://devzone.nordicsemi.com/thread/62712?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 13:06:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3952c813-720c-480f-97f4-20e0c8869cd3</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Ok - the call I was concerned about wasn&amp;#39;t being asked to return an err_code hence must be unrelated.  That&amp;#39;s why I couldn&amp;#39;t find it.  Thanks Hung.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap error</title><link>https://devzone.nordicsemi.com/thread/62711?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 12:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b340f28-7fb7-4b32-9f86-5067bd541f6f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Are you sure you didn&amp;#39;t modify the code?  in ble_app_uart in main.c I have this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void on_ble_evt(ble_evt_t * p_ble_evt)
{
    uint32_t                         err_code;
    
    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(err_code);
            m_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
            break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if you are using the central example ble_app_uart_c, in main.c you should have this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case BLE_GAP_EVT_CONNECTED:
    APPL_LOG(&amp;quot;Connected to target\r\n&amp;quot;);
    err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
    APP_ERROR_CHECK(err_code);

    // start discovery of services. The NUS Client waits for a discovery result
    err_code = ble_db_discovery_start(&amp;amp;m_ble_db_discovery, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle);
    APP_ERROR_CHECK(err_code);
    break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you removed all the API call when the event occurs, you should also remove the     APP_ERROR_CHECK(err_code);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap error</title><link>https://devzone.nordicsemi.com/thread/62710?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 09:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af340258-046b-4821-9276-cb49eb7a7b10</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;So this is the nRF52 and SDK 11 with SD 132 v 2.  This is in main in the function &lt;code&gt;on_ble_evt()&lt;/code&gt;  I am connecting via the NUS and the connection parameters are according to the example in the SDK.  If I comment out the error check, the connection seems fine but as I say I just want to make sure I am not storing up a problem for later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap error</title><link>https://devzone.nordicsemi.com/thread/62709?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 08:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:805783ec-29e7-4194-8663-bb315c6749c3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Richie: You need to provide more code on where you found that, which function, which file name which SDK etc. It doesn&amp;#39;t make much sense to check for err_code without assign a value or return code to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>