<?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>CLI Example - how to write a characteristic?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67533/cli-example---how-to-write-a-characteristic</link><description>This (in SDK v17.0.2): 
 Experimental: BLE Interactive Command Line Interface Example 
 https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_interactive.html 
 The documentation says: 
 
 But this seems to be missing anywhere to specify</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Oct 2020 11:07:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67533/cli-example---how-to-write-a-characteristic" /><item><title>RE: CLI Example - how to write a characteristic?</title><link>https://devzone.nordicsemi.com/thread/276835?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2020 11:07:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8f8acaa-7bb4-4109-80a7-966eb082aab4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Looking back through my logs, I can see some messages saying, &amp;quot;Too many characteristics discovered&amp;quot;.&lt;/p&gt;
&lt;p&gt;What I was doing was:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scan for devices&lt;/li&gt;
&lt;li&gt;Connect to a device&lt;/li&gt;
&lt;li&gt;Discover the Services&lt;/li&gt;
&lt;li&gt;&lt;em&gt;For each Service&lt;/em&gt;, discover the Characteristics&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, I guess, the Characteristic I then tried to write had just got &amp;quot;lost&amp;quot; among the&amp;nbsp;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;Too many characteristics discovered&amp;quot; ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If, instead, I just discover Characteristics for the &lt;em&gt;one&lt;/em&gt; Service I require, the write then works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example - how to write a characteristic?</title><link>https://devzone.nordicsemi.com/thread/276825?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2020 10:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea54a826-c6f0-4fab-8df2-0ad0bd833b38</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Andrew,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems that we don&amp;#39;t support having multiple characteristics with same (short) UUID.&amp;nbsp;&lt;br /&gt;This is the struct to handle characteristics in the interactive firmware:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;typedef struct
{
    ble_uuid_t            uuid;              /**&amp;lt; UUID of the characteristic. */
    uint16_t              decl_handle;       /**&amp;lt; Handle of the characteristic declaration. */
    uint16_t              value_handle;      /**&amp;lt; Handle of the characteristic value. */
    uint16_t              cccd_desc_handle;  /**&amp;lt; Handle of the CCCD descriptors. */
    ble_gatt_char_props_t char_props;        /**&amp;lt; GATT Characteristic Properties. */
} char_data_t;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I would consider it&amp;#39;s a limitation of the interactive example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I don&amp;#39;t have any issue with writing to the&amp;nbsp;characteristic using only the characteristic UUID. Could you try to test&amp;nbsp;with the ble_app_uart example ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example - how to write a characteristic?</title><link>https://devzone.nordicsemi.com/thread/276698?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 15:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2324b100-3c1e-4662-b247-63cac015fa36</guid><dc:creator>awneil</dc:creator><description>[quote userid="2121" url="~/f/nordic-q-a/67533/cli-example---how-to-write-a-characteristic/276691#276691"]you will get the service UUID to use[/quote]
&lt;p&gt;That wasn&amp;#39;t the question!&lt;/p&gt;
[quote userid="6462" url="~/f/nordic-q-a/67533/cli-example---how-to-write-a-characteristic"]this seems to be missing anywhere to specify the Service UUID[/quote]
&lt;p&gt;The question is: how/where do I specify the Service UUID - as the documentation for the &amp;#39;gatt write&amp;#39; command does not mention it.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;documentation for the &amp;#39;gatt write&amp;#39; command only mentions&amp;nbsp;&amp;lt;char uuid&amp;gt; - so where/how should the&amp;nbsp;&amp;lt;service uuid&amp;gt; be specified?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example - how to write a characteristic?</title><link>https://devzone.nordicsemi.com/thread/276691?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 15:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0054935-6cb8-48a8-8ac1-f9fe691dba4a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Andrew,&lt;/p&gt;
&lt;p&gt;The Service UUID is discovered and the base is added automatically as far as I know. So what you need to do is to call &amp;quot;gatt services &amp;lt;device&amp;gt;&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;It will discover the services. After that you will get the service UUID to use. In the following screenshot I tested with ble_app_uart :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/544x262/__key/communityserver-discussions-components-files/4/6505.pastedimage1603466917862v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;(I forgot to type the service UUID on the first trial)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>