<?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>NRF_ERROR_BUSY  while enabling several notifications</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80537/nrf_error_busy-while-enabling-several-notifications</link><description>Hi Nordic, 
 I am working with the s140, sdk 15.3. My application is a central that should connect to a device that has several services. As soon as the connected event is triggered, it initiates the discovery with the ble_db_discovery_start(...). 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Oct 2021 14:41:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80537/nrf_error_busy-while-enabling-several-notifications" /><item><title>RE: NRF_ERROR_BUSY  while enabling several notifications</title><link>https://devzone.nordicsemi.com/thread/333769?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 14:41:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d040ca77-210b-4db4-aca0-bdc9f7e47a72</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, then waiting for BLE_GATTC_EVT_WRITE_RSP should do the trick. Could it be that you do not have a full&amp;nbsp;overview of your application, and that some you start a new GATT&amp;nbsp;procedure somewhere&amp;nbsp;else? Perhaps you end up somehow making two calls to&amp;nbsp;sd_ble_gattc_write() after the&amp;nbsp;BLE_GATTC_EVT_WRITE_RSP? That is just speculation, though.&lt;/p&gt;
&lt;p&gt;Have you done any debugging to see what happens? Do you get the&amp;nbsp;BLE_GATTC_EVT_WRITE_RSP at&amp;nbsp;some&amp;nbsp;point after getting&amp;nbsp;NRF_ERROR_BUSY&amp;nbsp; returned from&amp;nbsp;sd_ble_gattc_write()?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_BUSY  while enabling several notifications</title><link>https://devzone.nordicsemi.com/thread/333762?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 13:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:833ae2c0-6e3f-4822-9db9-e78aa40d306e</guid><dc:creator>User1321</dc:creator><description>&lt;p&gt;Since it is calling the&amp;nbsp;&lt;em&gt;sd_ble_gattc_write&lt;/em&gt; , i thought it was required to wait for the &lt;strong&gt;BLE_GATTC_EVT_WRITE_RSP&lt;/strong&gt; event.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint32_t cccd_configure(uint16_t conn_handle, uint16_t cccd_handle, bool enable)
{
    //NRF_LOG_INFO(&amp;quot;Configuring CCCD. CCCD Handle = %d, Connection Handle = %d&amp;quot;,  cccd_handle,conn_handle);
    uint8_t buf[BLE_CCCD_VALUE_LEN];

    buf[0] = enable ? BLE_GATT_HVX_NOTIFICATION : 0;
    buf[1] = 0;

    ble_gattc_write_params_t const write_params =
    {
        .write_op = BLE_GATT_OP_WRITE_REQ,
        .flags    = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE,
        .handle   = cccd_handle,
        .offset   = 0,
        .len      = sizeof(buf),
        .p_value  = buf
    };

    return sd_ble_gattc_write(conn_handle, &amp;amp;write_params);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_BUSY  while enabling several notifications</title><link>https://devzone.nordicsemi.com/thread/333724?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 12:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e35bc0af-c2d8-45ee-8731-46318327cb93</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You write that you get NRF_ERROR_BUSY from cccd_configure(), which is implemented in most service implementations.Most likely the issue is that a GATT procedure is already active, and you need to wait for it to finish. To know more we would need to know which&amp;nbsp;function&amp;nbsp;within cccd_configure() is it that returns this? The further down you follow this the better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>