<?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>Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6700/adding-characteristic-user-description-0x2901-0x2902</link><description>Hi Team, 
 I am trying to implement Blugiga&amp;#39;s cable replacement service in Nordic chip.
I have successfully changed required UUIDs for services and characteristics please refer it
 here 
 Now unable to do following: 
 
 
 Adding Characteristic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Apr 2015 08:16:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6700/adding-characteristic-user-description-0x2901-0x2902" /><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23494?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 08:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df522e1b-173d-4693-ad88-9d9f4d6ed919</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;I gave you the answer to this on friday, in the Mypage support portal. A quick search in the forum returns this: &lt;a href="https://devzone.nordicsemi.com/question/2159/user-description-descriptor/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is the 0x2901.&lt;/p&gt;
&lt;p&gt;Add these lines to your code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static char user_desc[] = &amp;quot;name&amp;quot;;
char_md.p_char_user_desc  = (uint8_t *) user_desc;
char_md.char_user_desc_size = strlen(user_desc);
char_md.char_user_desc_max_size = strlen(user_desc);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23493?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 08:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc31fd83-5fb7-4264-9afe-1f3d801bbba2</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;What does the call-stack look like when you end up in the app error handler? What error code are you seeing?
If the UD writable you &lt;em&gt;must&lt;/em&gt; set the wr_aux flag to 1. I believe this is your problem now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23492?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 06:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:526d9379-6a63-4ebc-9882-164ab47c9fb8</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;doing same for char_md.p_user_desc_md stops advertising.
LED1 doesn&amp;#39;t blink after assigning char_md.p_user_desc_md = &amp;amp;ud_md; //ud_md is different instance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23495?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 13:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eef2025-c94b-45a5-921d-730306179b6f</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Again, 0x2901 is User Description. To add the User Description, the char_md.p_user_desc_md must be set as well. Do the same as you do for CCCD, but use different ble_gatts_attr_md_t instances of course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23491?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 13:22:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:646fef73-c46d-4f77-9051-ea04d2659a01</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;//mj
uint32_t      err_code;
ble_gatts_attr_md_t cccd_md;
ble_uuid128_t   nus_base_uuid_char = NUS_BASE_UUID_CHAR;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;memset(&amp;amp;cccd_md, 0, sizeof(cccd_md));

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.write_perm);

cccd_md.vloc = BLE_GATTS_VLOC_STACK;
//mj

memset(&amp;amp;char_md, 0, sizeof(char_md));
	char_md.char_props.indicate			 = 1; //mj
char_md.char_props.write         = 1;
//char_md.char_props.write_wo_resp = 1; //mj
char_md.p_char_user_desc         = NULL;
char_md.p_char_pf                = NULL;
char_md.p_user_desc_md           = NULL;
char_md.p_cccd_md                = &amp;amp;cccd_md; //mj NULL earlier
char_md.p_sccd_md                = NULL;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Still not showing 0x2901 in Mobile Application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23490?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 11:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1de9be48-ef34-4f05-b0e0-e20c04f46630</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Please read the document I linked. 0x2901 is Characteristic User Description. 0x2902 is Client Characteristic Configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23489?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 11:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12c90255-5495-40cf-a4f8-841ec91f6eab</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;Hi!
I need to add 0x2901 and not 0x2902.
was it typo?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23488?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 11:09:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:729de0e1-b219-4efe-87af-efc4344eb5d0</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;First of all, here is a reference explaining what the adopted UUIDs mean: &lt;a href="https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx"&gt;developer.bluetooth.org/.../DescriptorsHomePage.aspx&lt;/a&gt;. You are lacking a User Description and a CCCD for your characteristic.&lt;/p&gt;
&lt;p&gt;To add a user description, see here: &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00283.html"&gt;developer.nordicsemi.com/.../a00283.html&lt;/a&gt;. The p_user_desc_md must be pointing to a proper ble_gatts_attr_md_t. This is very close to how you add a CCCD, so you can look in other examples how that is done. Also set char_ext_props.wr_aux to 1 if it is writable.&lt;/p&gt;
&lt;p&gt;Simply add a CCCD to add the UUID 0x2902 descriptor.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23487?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 10:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e2eda5d-9cc3-43e9-92bd-455a0db25bea</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;I don&amp;#39;t have any information regarding peer device is doing proper discovery or not.&lt;br /&gt;
Only available information is Mobile app and Blugiga device using some propriety service called cable replacement and I am trying to achieve same in nordic soc by modifying ble_uart app.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have idea how to add 0x2901 descriptor.  Using Nordic&amp;#39;s Master Control android app shows 0x2902 descriptor and I need to add 0x2901.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding Characteristic User Description 0x2901,0x2902</title><link>https://devzone.nordicsemi.com/thread/23486?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 10:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccac58f-8a46-4f21-88c7-c1ccd8cfa076</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Are you depending on hard-coded handles or will the peer device do a proper discovery? Handles are given out sequentially, so it is not possible to guarantee that every declaration will be given the same handle as the device you are copying.&lt;/p&gt;
&lt;p&gt;Please also list how you are unable to add user description fields. How are you trying to do it, and what return codes do you see?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>