This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Maximum fixed-length attribute length vs Maximum variable-length attribute length

In ble_gatts.h, I see:

#define BLE_GATTS_FIX_ATTR_LEN_MAX (510)  //< Maximum length for fixed length Attribute Values.
#define BLE_GATTS_VAR_ATTR_LEN_MAX (512)  //< Maximum length for variable length Attribute Values.

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.

Parents
  • 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.

    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.

    Carles

Reply
  • 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.

    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.

    Carles

Children
No Data
Related