cancel
Showing results for 
Search instead for 
Did you mean: 

Elaborate correct number for max_attr_records in aci_gatt_add_serv

aj.sk
Associate III

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?

12 REPLIES 12
aj.sk
Associate III

@Winfred LU​ That's where I have a problem, what are "extended properties"?

Winfred LU
ST Employee

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
Associate III

@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