<?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>BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95665/ble-characteristic-update-length-issue</link><description>Hello, 
 Please take a look at the below function. I am able to write/read the characteristic data from nRF App. 
 
 Now here is my function to update the characteristic data. 
 
 But here my problem is in 1st code block if I am setting the attr_char_value</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Jan 2023 07:20:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95665/ble-characteristic-update-length-issue" /><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/406775?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2023 07:20:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43fc7ad2-75d5-4e79-8c74-71470dbee95b</guid><dc:creator>Kim David</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I suggest to indicates if the characteristic value has variable length where you configure the attribute metadata as below and try again.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; // OUR_JOB: Step 2.B, Configure the attribute metadata&lt;br /&gt; ble_gatts_attr_md_t attr_md;&lt;br /&gt; memset(&amp;amp;attr_md, 0, sizeof(attr_md));&lt;/p&gt;
&lt;p&gt;attr_md.vlen&amp;nbsp; = 1;&amp;nbsp; &amp;nbsp;/* indicate if the characteristic value has variable length */&lt;/p&gt;
&lt;p&gt;attr_md.vloc = BLE_GATTS_VLOC_STACK;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/405587?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2023 06:43:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcbdca5f-2a2c-4523-82fc-dbe492ca3dfc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think I would rather do an erase/clearing the bytes on the receiving side, as that would be where the issue with excessive bytes being stored, not on the writing side. So before receiving an updated message you can erase the existing one to avoid the excessive data when reading the new characteristic value.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/405372?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2023 07:18:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39dca11b-af68-4b2f-b37c-a4ba47f4035d</guid><dc:creator>Neeraj Dhekale</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;Do you mean for example If I write &amp;quot;HELLO&amp;quot; (0x48454c4c4f) before updating it I should clear all the bytes before writing &amp;quot;HI&amp;quot; (0x4849000000) like this?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Neeraj Dhekale&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/405179?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 09:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2905cdf-dcbf-432a-8fb6-ae49480bab19</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think the issue is the length, but rather that you &amp;quot;overwrite&amp;quot; the last write you did without deleting it first. I think it would be best to erase the char data on the receiver end when getting a new update, as the length of the characteristic won&amp;#39;t matter when it&amp;#39;s already received.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/404953?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2023 08:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbaaa8fe-bd3b-4ce8-bccb-d205aa90c95f</guid><dc:creator>Neeraj Dhekale</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I am using nRF52840 DK board, SoftDevice, and nRF5_SDK_17.0.2_d674dde.&lt;/p&gt;
&lt;p&gt;I have gone through the link given above. It is implemented in my case. As I said, I am able to write as well as read using nRF App, but I am facing the problem of length in response / read. I have to keep an unnecessary&amp;nbsp;constant length.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Neeraj Dhekale&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE characteristic update length issue.</title><link>https://devzone.nordicsemi.com/thread/404947?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2023 08:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff0a5657-0cb3-4a88-b1a1-ea48b4d03eed</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What SDK and SDK version are you using for development? Please check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84494/custom-characteristic-update-value-for-read/351894"&gt;this case&lt;/a&gt; where updating characteristics is explained in detail by my good colleague Karl.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>