<?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>Guidance for selecting characteristic initial length and max length?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60698/guidance-for-selecting-characteristic-initial-length-and-max-length</link><description>Hello, in my travels through Nordic development, somehow I am only now creating truly custom characteristics, and I realize I have no idea why there is both an initial and a maximum length specified parameters when you create it. So my questions are:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 05:09:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60698/guidance-for-selecting-characteristic-initial-length-and-max-length" /><item><title>RE: Guidance for selecting characteristic initial length and max length?</title><link>https://devzone.nordicsemi.com/thread/247198?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 05:09:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c4e495c-6bf5-485c-853b-4a5ac58fd6e4</guid><dc:creator>riceman0</dc:creator><description>&lt;p&gt;Thanks very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Guidance for selecting characteristic initial length and max length?</title><link>https://devzone.nordicsemi.com/thread/247130?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 13:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b30ea133-131f-4188-a2e6-0f87dba9a482</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;So, the maximum length is how much space is reserved and the initial length is the current size of the characteristic value. The maximum length can&amp;#39;t be changed, but you can change the initial length on any and every update.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]1) why are these different?&amp;nbsp; do characteristics grow and shrink?[/quote]
&lt;p&gt;&amp;nbsp;Yes, a lot of use-cases require variable characteristic value. For example, &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/13521/variable-length-characteristic-with-notification"&gt;this ticket&lt;/a&gt;.&lt;/p&gt;
[quote user=""]2) what is the maximum characteristic length?[/quote]
&lt;p&gt;&amp;nbsp;The maximum length is decided by the BLE spec, and looks to be 512 octets, but what limits this in practice is what can be sent in one packet, which is by default 20 bytes (ATT_MTU - 3). It is possible, with some of our SoftDevices, to enable extended MTU. The downside for this would mainly be power consumption.&amp;nbsp;&lt;/p&gt;
[quote user=""]3) is there a big drawback to making characteristics larger rather than smaller?[/quote]
&lt;p&gt;The main drawback is taking up more memory space for your characteristic value, and the power consumption of your application from sending more data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>