<?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>Is it possible to have a zero length characteristic read?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87417/is-it-possible-to-have-a-zero-length-characteristic-read</link><description>We&amp;#39;re using the read authentication trigger to detect when a characteristic is being read, so we can update the value before a read. Is it possible to have a read with zero length? 
 This is the data handler for the service, and I did confirm that it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 May 2022 11:42:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87417/is-it-possible-to-have-a-zero-length-characteristic-read" /><item><title>RE: Is it possible to have a zero length characteristic read?</title><link>https://devzone.nordicsemi.com/thread/366206?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 11:42:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acb08ccc-7384-4125-8296-db033f070071</guid><dc:creator>CurtisHx2</dc:creator><description>&lt;p&gt;Figured out what we doing wrong.&amp;nbsp; We were giving the characteristic an initial length of 1 and there was also a problem where the value (and new length) was not getting updated correctly in the code base.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to have a zero length characteristic read?</title><link>https://devzone.nordicsemi.com/thread/365681?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 06:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39d01738-da82-4a00-9270-a0db5198396b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you init the characteristic with characteristic_add(), please try to set this:&lt;/p&gt;
&lt;p&gt;add_char_params.is_var_len = true;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>