Skip to main content
aj.sk
Associate III
October 18, 2021
Question

Elaborate correct number for max_attr_records in aci_gatt_add_serv

  • October 18, 2021
  • 12 replies
  • 2643 views

I'm struggling to get some detailed information on how to determine the correct number for the max_attr_records value of the aci_gatt_add_serv() function.

I know that you need 1 for the service itself and then at least 2 for each characteristic, but what else requires an attribute record?

Let say I have the following characteristic

aci_gatt_add_char(hServiceConfiguration, UUID_TYPE_128, uuid, 6,

                                          CHAR_PROP_NOTIFY|CHAR_PROP_READ|CHAR_PROP_WRITE, ATTR_PERMISSION_ENCRY_WRITE,

                                          GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP,

                                          16, 0 , &hCharTripConf);

What would be the resulting number of attribute records? I came up with 4, but I'm not sure if that's correct.

Further, there seems to be a limit for the total attribute records as I can only add a quite limited amount of services. How is this limit defined?

    This topic has been closed for replies.

    12 replies

    Winfred LU
    ST Employee
    October 25, 2021

    The Characteristic Extended Properties declaration is a descriptor that defines additional Characteristic Properties.

    It describes additional properties on how the Characteristic Value can be used, or how the characteristic descriptors can be accessed.

    Currently supported properties:

    • Reliable Write : If set, permits reliable writes of the Characteristic Value
    • Writable Auxiliaries: If set, permits writes to the characteristic descriptor
    aj.sk
    aj.skAuthor
    Associate III
    October 25, 2021

    @Winfred LU​  Thank you very much for the clarification!

    I have two other rather important issues, do you think you could may have a look at them?

    https://community.st.com/s/question/0D53W00000xqx1cSAA/acigattreadusingcharacuuid-returns-errinvalidhcicmdparams

    https://community.st.com/s/question/0D53W000019C6RaSAK/ble-whitelisting