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

Maximum number of characteristics

Hi I am using S110 v6.0.0 I have written an app that has a single service and I then register the same characteristics until it fails. The properties is 0xA (read/write). When I use _VLOC_STACK it runs out of memory and for value len=10 I can register 24 characteristics and for value len = 20 I can register 20 (for value len = 1, I can register 29)

I then modified my app so that it uses _VLOC_USER and then regardless of value len I can register 30 for all.

We have a customer who is asking to be able to register at least 33 characteristics spread over 8 services. My guess is that registering the service attribute is going to reduce that number down even more.

Is there anything you can suggest?

Look forward to hearing from you

  • Hi Thank you for the feedback. I managed to find the issue in my case. I was using VLOC_USER in all the places - even for the CCCD. Once I modified it to just have VLOC_USER for the char values I got further. And yes, I provide p_value as a pointer to a buffer that I manage. What I do is ... unsigned char myCharBufs[600]; int myCharBufFree=0;

    And then each time I register a value I copy the data to myCharBufs[myCharBufFree] and then do myCharVufFree += Length_of_char_value;

    I have found that the maximum chars I can register is 30 if the uuid for the char is 128 bit. If the uuid is 16 bit , then I can register 44

    Hence the absolute maximum one is going to achieve in v6.0.0 is 44.

    Which seems to suggest that Nordic are populating the gatt table with the actual uuid values and NOT the 4 byte uuid handles.

    Many thanks for the feedback.

    Kind regards

  • Hi If I always use VLOC_USER ...

    For 128 bit uuids ... (and Characteristics with 0xA property plus 20 byte length)

    With 1 svc, I can install 30 characteristics. With 4 svcs it drops to 28 characteistics. with 8 svcs it drops to 25 characteristics.

    If I use 16 bit uuid ... (and Characteristics with 0xA property plus 10 byte length), then

    With 1 svc, I can install 45 characteristics. With 4 svcs it drops to 44 characteistics. with 8 svcs it drops to 42 characteristics.

    This seems to suggest the gatt table is populated with the actual uuid numbers (2 or 16 bytes) and not the uuid handles.

    I have not yet moved over to the latest 7.0.0 stack. Anyone care to comment if it is likely to be different?

Related