<?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>Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52288/unable-to-add-descriptors-to-the-characteristic</link><description>Hello, 
 
 I have created a service with three characteristics in which the 1st and 3rd characteristics have all the three Notify, read, write properties. The second characteristic has only read and write properties. So in the creation of these characteristics</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Sep 2019 09:16:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52288/unable-to-add-descriptors-to-the-characteristic" /><item><title>RE: Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/thread/210653?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 09:16:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:898381cf-3ca6-46c3-94f4-56b967ef28b8</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;I tried changing the uuid type of the descriptor but still the result is no different. I want to tell you something interesting. I tried writing these descriptors in the ble_app_blinky example and the same code i pasted in its service init function. When i run the program i could see the descriptors in the button &lt;span&gt;characteristic&lt;/span&gt; but they are displayed as unknown descriptors. And since the button characteristic has a notify property the CCCD is displayed by default and the descriptors that i added are displayed below that CCCD as unknown descriptors.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My questions are:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1) Why is the same descriptor code not resulting in the termination of execution of the program when i write it in the blinky example?&lt;/p&gt;
&lt;p&gt;2) Why are the descriptors that I added in the blinky example shown as unknown where as i have used the defined UUID&amp;nbsp;BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG in ble_types.h file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please write to me regarding this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Sudeep R J&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/thread/210642?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 09:02:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04036b50-2eb5-4765-a37e-6eecffeeef59</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The return code 0x15 =&amp;nbsp;NRF_ERROR_FORBIDDEN, and the description for this error code when returned from&amp;nbsp;sd_ble_gatts_service_add() is &amp;quot;Forbidden value supplied, certain UUIDs are reserved for the stack&amp;quot; (you can find this text in the ble_gatts.h).&lt;/p&gt;
&lt;p&gt;I expect the problem here is that&amp;nbsp;&lt;span&gt;uuid&amp;nbsp;&lt;/span&gt;&lt;span&gt;type is not&amp;nbsp;&lt;/span&gt;BLE_UUID_TYPE_BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/thread/210582?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 05:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac9138db-ff93-40d3-87a5-905cd75cfeca</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hey Kenneth,&lt;/p&gt;
&lt;p&gt;I am SRJ here with my other account and thanks for your reply. According to your reply what i understood is you want me to know where the error is in the program that is causing the program to halt at that breakpoint. I already know where it is causing the error. I debugged the code step by step and i went into the&amp;nbsp;services_init(void) function then at the bottom of that function i stepped into&amp;nbsp;ble_dts_init(&amp;amp;m_dts, &amp;amp;dts_init) function call.&lt;/p&gt;
&lt;p&gt;Then in that&amp;nbsp;ble_dts_init function i stepped over all the lines and when i reached the&amp;nbsp;descriptor_add() function then again i stepped into it and at the last in that function there is function call for&amp;nbsp;sd_ble_gatts_descriptor_add() function which in turn is a SV Call. From there the function returns an error code of value 15.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So this is where the things are going wrong. Shouldn&amp;#39;t I write the code for CCCD as it is added to the descriptors list of the characteristics that have the notify property?&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3632.Capture2.PNG" /&gt;The first picture shows the line of code that enters into descriptor_add function in the ble_srv_common.c file.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2677.Capture1.PNG" /&gt;The second image shows the line of code that returns a SV Call and that is where the error is coming from.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kindly help me with this i am stuck with my work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Sudeep R J&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/thread/210389?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 12:07:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f039a25-aad7-4ef0-ae3c-7e57741c4206</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Seems you have an assert, so you need to identify the file name, line number and error code to understand what is wrong. This should be possible to do like shown in this thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52220/ble-connection-lost-after-flash-write"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52220/ble-connection-lost-after-flash-write&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to add descriptors to the characteristic</title><link>https://devzone.nordicsemi.com/thread/210343?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 10:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33875a59-774b-4822-924c-e67deb47ab30</guid><dc:creator>SRJ</dc:creator><description>&lt;p&gt;The UUID for CCCD is 0x2902. Apologies for typing mistake.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>