AnsweredAssumed Answered

BLUENRG - aci_gatt_add_serv() description of parameter max_attr_records

Question asked by Maik on Aug 2, 2014
Latest reply on Sep 12, 2014 by Marchese.Graziella
Hello,

there is one parameter in aci_gatt_add_serv() which needs clarification: max_attr_records

Looking at the documentation and the sample code (the comment there suggest that even the st programer of the sample code was confused) does not give an answer to fully understand this parameter.
Right now I have to use trial and error to find a working value. When looking at the parameter name it suggest that it is the maximum number of attribute records. However it looks like you have to double the actual amount of attribute records of the service and add 2 or 3 to get the correct number. Using lower numbers will result in a wrong service announcement and a non working device.

tBleStatusaci_gatt_add_serv(tHalUint8service_uuid_type,
consttHalUint8*service_uuid,
tHalUint8service_type,
tHalUint8max_attr_records,
tHalUint16*serviceHandle);

Please give a calculation example for this parameter.

Thanks,

Maik

Outcomes