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

SD: Characteristics Per Service Limit

Is there a limit to the number of characteristics per (custom) service?

After some testing, it looks like 20 is the maximum (21 causes the device to stop functioning) - is this corrrect and is it documented somewhere?

Thanks :)

Parents
  • Actually, in terms of my attributes, 72 bytes out of a total of 94 bytes is actually being stored in flash memory using the VLOC_USER option. So really, only 22 bytes of attributes is being stored on the SD stack.

    This led me to me believe that the limit is based on the number of characteristics and not the amount of stack data they consume...

    Combining nine 2-byte characteristics into a single characteristic of 18-bytes stopped the crashing which further supports this assumption.

    However, I also understand that there is overhead in addition to the attribute data for each characteristic (in reference to your final sentence).

    So, how large is the overhead (in bytes) for each characteristic (i.e. stack required not including attribute data)?

    Thanks.

Reply
  • Actually, in terms of my attributes, 72 bytes out of a total of 94 bytes is actually being stored in flash memory using the VLOC_USER option. So really, only 22 bytes of attributes is being stored on the SD stack.

    This led me to me believe that the limit is based on the number of characteristics and not the amount of stack data they consume...

    Combining nine 2-byte characteristics into a single characteristic of 18-bytes stopped the crashing which further supports this assumption.

    However, I also understand that there is overhead in addition to the attribute data for each characteristic (in reference to your final sentence).

    So, how large is the overhead (in bytes) for each characteristic (i.e. stack required not including attribute data)?

    Thanks.

Children
No Data
Related