<?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>How to add Characteristic Valid Range descriptor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13553/how-to-add-characteristic-valid-range-descriptor</link><description>Hi In my project I need to add Characteristic Valid Range descriptor and Characteristic Presentation Format descriptor to characteristics. I added Characteristic Presentation Format descriptor the code I used to add is shown below 
 After adding it showing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 May 2016 14:58:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13553/how-to-add-characteristic-valid-range-descriptor" /><item><title>RE: How to add Characteristic Valid Range descriptor</title><link>https://devzone.nordicsemi.com/thread/51715?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 14:58:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f42f8ff-380f-417d-b40c-fae0b32342fe</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Characteristic Presentation format descriptor is one of the characteristic declarations that are given to &lt;code&gt;sd_ble_gatts_characteristic_add()&lt;/code&gt; as part of the GATT Characteristic metadata structure (&lt;code&gt;ble_gatts_char_md_t&lt;/code&gt;). You should check that the &lt;code&gt;p_char_pf&lt;/code&gt; values are according to specification.&lt;/p&gt;
&lt;p&gt;Less common Characteristic declarations are provided by the use of &lt;code&gt;sd_ble_gatts_descriptor_add()&lt;/code&gt;. The descriptor will be added to the most recently added characteristic. You must use the general &lt;code&gt;ble_gatts_attr_t&lt;/code&gt; data structure to make the attribute entry for the GATTS table, and format the value field (&lt;code&gt;.p_value&lt;/code&gt;) according to the &lt;a href="https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.valid_range.xml"&gt;specification for the Characteristic Valid Range descriptor&lt;/a&gt;. See the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v2.0.0%2Fgroup___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_6_2_1_0_2_4_2_2&amp;amp;anchor=ga0e1478bd565ad99f998671e3baf9847d"&gt;&lt;code&gt;sd_ble_gatts_descriptor_add()&lt;/code&gt; documentation&lt;/a&gt; for further details.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>