<?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>GATT service start and end handles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75145/gatt-service-start-and-end-handles</link><description>hello, 
 i am working on nrf52 dk board .NUS sdk 16 
 I&amp;#39;d like to know the start/end characteristic handle values for each service. Is the 32-bit service handle encoded as two 16-bit characteristic start/end handles? If not, is there a way to determine</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 May 2021 14:25:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75145/gatt-service-start-and-end-handles" /><item><title>RE: GATT service start and end handles</title><link>https://devzone.nordicsemi.com/thread/309829?ContentTypeID=1</link><pubDate>Fri, 14 May 2021 14:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeda1ef9-9499-4a83-b755-ae8632c89a21</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. The handle values are not necessarily the same for all devices that use NUS, and will be different if you change configuration (order of adding other services compared to NUS etc).&amp;nbsp;When I printed the handle values for the unmodified NUS example in SDK 17.0.2 I got the following (two normal characteristics plus the CCCD):&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; ble_nus_c: NUS RX characteristic handle value: 13&lt;br /&gt;&amp;lt;info&amp;gt; ble_nus_c: NUS TX characteristic handle value: 15&lt;br /&gt;&amp;lt;info&amp;gt; ble_nus_c: NUS TX CCCD handle value: 16&lt;/p&gt;
&lt;p&gt;So if you pick numbers &amp;lt;= 13 and &amp;gt;= 16 when you do service discovery, you would find all in this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT service start and end handles</title><link>https://devzone.nordicsemi.com/thread/309713?ContentTypeID=1</link><pubDate>Fri, 14 May 2021 08:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:702ad49d-0bb8-471a-819f-a5d27bd6a6ea</guid><dc:creator>0_velan_1</dc:creator><description>&lt;p&gt;thanks for reply&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;actually, my doubt is I am working on AT command project&amp;nbsp; it&amp;#39;s like structured command is there&lt;/p&gt;
&lt;p&gt;is like (AT+UBTGDCS=&amp;lt;conn_handle&amp;gt;,&amp;lt;start&amp;gt;&amp;lt;end&amp;gt;, - this command for&amp;nbsp; Discovers all characteristics of a service)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;conn_handle - Handle of the connected device.&lt;/p&gt;
&lt;p&gt;start&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Start handle of the service.&lt;/p&gt;
&lt;p&gt;end&amp;nbsp; &amp;nbsp;-End handle of the service&lt;/p&gt;
&lt;p&gt;I need to pass this parameter through UART terminal like (putty) this response back from the server&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Discovers all characteristics of a service...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT service start and end handles</title><link>https://devzone.nordicsemi.com/thread/309703?ContentTypeID=1</link><pubDate>Fri, 14 May 2021 07:14:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c35e65a6-caab-42e0-b24c-0b6a8534e1ee</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure I understand the question.&lt;/p&gt;
&lt;p&gt;There are only two characteristics for the NUS service, and their UUD is defined like this (from SDK code):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NUS_BASE_UUID                  {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**&amp;lt; Used vendor specific UUID. */
#define BLE_UUID_NUS_SERVICE 0x0001                         /**&amp;lt; The UUID of the Nordic UART Service. */
#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003               /**&amp;lt; The UUID of the TX Characteristic. */
#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002               /**&amp;lt; The UUID of the RX Characteristic. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So you will only discover two handles for the NUS service. In theory the only way to determine those is to do service discovery, but if you &lt;em&gt;know&lt;/em&gt; that it will&amp;nbsp;never&amp;nbsp; change then you could in fact hard code the handles on the peer (see for instance &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21386/bypass-or-skip-the-discovery-service-nrf52-sdk-12-2/83809#83809"&gt;this post&lt;/a&gt;). I am not sure if that is what you want, though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>