<?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>Maximum fixed-length attribute length vs Maximum variable-length attribute length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12823/maximum-fixed-length-attribute-length-vs-maximum-variable-length-attribute-length</link><description>In ble_gatts.h, I see: 
 #define BLE_GATTS_FIX_ATTR_LEN_MAX (510) //&amp;lt; Maximum length for fixed length Attribute Values.
#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) //&amp;lt; Maximum length for variable length Attribute Values.
 
 Why is maximum length for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Mar 2016 08:17:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12823/maximum-fixed-length-attribute-length-vs-maximum-variable-length-attribute-length" /><item><title>RE: Maximum fixed-length attribute length vs Maximum variable-length attribute length</title><link>https://devzone.nordicsemi.com/thread/48745?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 08:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac899e43-c3aa-494e-bf20-a7544e0c0f15</guid><dc:creator>Carles</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Why is maximum length for fixed length
attribute shorter than the one for
variable length attribute? If they
have to be different I was thinking a
variable length would use more
overhead and thus would have shorter
maximum length.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is just due to the internal format of the Attribute Table and some decisions that were made when the RAM layout of it was made a while back. We use some bits in the length for other purposes and we ended up with these maximum lengths.&lt;/p&gt;
&lt;p&gt;Carles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>