<?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 user description?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68057/how-to-add-characteristic-user-description</link><description>The SDK version I use is 15.3. And I tried to add the following code to the ble_nus.c 
 
 But it didn&amp;#39;t work.There is no characteristic 0x2901. I don&amp;#39;t know what&amp;#39;s wrong. Can you give me some advice? 
 Best regards, 
 June6</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Nov 2020 11:22:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68057/how-to-add-characteristic-user-description" /><item><title>RE: How to add characteristic user description?</title><link>https://devzone.nordicsemi.com/thread/278976?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 11:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2741c14a-2637-4798-b6e0-5cc67e10dfde</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming that it worked!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add characteristic user description?</title><link>https://devzone.nordicsemi.com/thread/278966?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 10:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d0850fd-2fe9-45da-bca4-9284dd87bce1</guid><dc:creator>June6</dc:creator><description>&lt;p&gt;Thank you for helping me a lot. Everything is OK!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;June6&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add characteristic user description?</title><link>https://devzone.nordicsemi.com/thread/278957?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 10:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43eef349-e665-4162-aee6-aeaf1ee65a32</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t know this, but you have to set the &lt;span&gt;&lt;a title="wr_aux" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/structble__gatt__char__ext__props__t.html?cp=4_7_3_1_2_3_1_2_1#a0f36b2c312c08c22853231a3bc8b950c"&gt;wr_aux&lt;/a&gt;&lt;/span&gt; bit in order to allow the user descriptor to be written to. I get the same error as you otherwise.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add characteristic user description?</title><link>https://devzone.nordicsemi.com/thread/278912?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 03:08:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa8ed35c-2aee-457f-9c91-c44cab98e30a</guid><dc:creator>June6</dc:creator><description>&lt;p&gt;Hi，&lt;/p&gt;
&lt;p&gt;Yes, maybe it&amp;#39;s the null pointer problem, because I found through debugging that the parameters there are indeed null. However, after I add your suggested code, I will receive an error (NRF_ERROR_INVALID_PARAM) when I perform the characteristic_add operation&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;June6&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add characteristic user description?</title><link>https://devzone.nordicsemi.com/thread/278803?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 14:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8efc76dc-2cfa-450e-b997-9c43cb6f4932</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;p_user_descr is a NULL pointer in your case. Please try to set it up like this instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    ble_add_char_user_desc_t  user_desc;

    uint8_t user_desc_str[] = &amp;quot;DFU&amp;quot;;

    memset(&amp;amp;user_desc, 0, sizeof(user_desc));
    user_desc.is_var_len       = 1;
    user_desc.char_props.read  = 1;
    user_desc.size             = (sizeof(user_desc_str) - 1); // Don&amp;#39;t include null termination
    user_desc.max_size         = (sizeof(user_desc_str) - 1); // Don&amp;#39;t include null termination
    user_desc.p_char_user_desc = user_desc_str;
    user_desc.read_access      = SEC_OPEN;
    user_desc.write_access     = SEC_OPEN;
    
    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.p_user_descr = &amp;amp;user_desc;
    ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>