<?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>Enabling Notify on 2 Characteristics</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33720/enabling-notify-on-2-characteristics</link><description>Hi, 
 I&amp;#39;m having some trouble when trying to implement a custom service with two characteristics (SDK 15.0). My central application is not able to write to the cccd handle for the second characteristic. I get the error: NRF_ERROR_BUSY, which I traced</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Apr 2018 07:56:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33720/enabling-notify-on-2-characteristics" /><item><title>RE: Enabling Notify on 2 Characteristics</title><link>https://devzone.nordicsemi.com/thread/129682?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 07:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4f11dc7-867d-4957-853a-967a4d8fd04c</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;If you really need to do this I suppose&amp;nbsp;adding a ble_evt variable to your service event handler function header could be the easiest route. Note however, that some functions that call the event handler don&amp;#39;t have any ble_evt variable to pass into the event handler (like&amp;nbsp;ble_nus_c_on_db_disc_evt()). A simple if(ble_evt == NULL) check might fix this though.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Notify on 2 Characteristics</title><link>https://devzone.nordicsemi.com/thread/129567?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 12:35:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6e90cf7-5ee5-4894-aa3b-1f4459dcb6a2</guid><dc:creator>nick7</dc:creator><description>&lt;p&gt;Thanks for the reply Martin.&lt;/p&gt;
&lt;p&gt;Ok, I will have a look at this. So far, I&amp;#39;ve solved my issue by simply writing to the cccd handle without response. But that is probably not an optimal solution.&lt;/p&gt;
&lt;p&gt;I could have worded my question above a bit more generally:&lt;/p&gt;
&lt;p&gt;How can I access softdevice events (e.g BLE_GATTC_EVT_WRITE_RSP) inside an application event handler (ble_cus_c_evt_handler)?&lt;/p&gt;
&lt;p&gt;Because if I want to wait for a BLE_GATTC_EVT_WRITE_RSP event, as described in the &lt;a title="infocenter" href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.0.0%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_3_1_1_0_2_2_2_11&amp;amp;anchor=ga90298b8dcd8bbe7bbe69d362d1133378"&gt;infocenter&lt;/a&gt; , I would like to access this softdevice event from the same function as I enable notifications.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Notify on 2 Characteristics</title><link>https://devzone.nordicsemi.com/thread/129555?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 12:09:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf0be3eb-f9e3-4715-95cd-5ce252124c23</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if I quite understand your question. But if you take a look at the &lt;em&gt;ble_app_rscs_c&lt;/em&gt;&amp;nbsp;example, you can see how to implement a queue of read and write operations. Take a look at the functions &lt;em&gt;cccd_configure()&lt;/em&gt; and &lt;em&gt;tx_buffer_process()&lt;/em&gt; in &lt;em&gt;ble_rscs_c.c&lt;/em&gt;. I suppose you can expand upon these functions and queue up your writes to the CCCD handles.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>