Question
BLUENRG - aci_gatt_add_serv() description of parameter max_attr_records
Posted on August 02, 2014 at 17:45
Hello,
there is one parameter in aci_gatt_add_serv() which needs clarification: max_attr_recordsLooking 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.tBleStatus
aci_gatt_add_serv
(
tHalUint8
service_uuid_type
,
const
tHalUint8
*
service_uuid
,
tHalUint8
service_type
,
tHalUint8
max_attr_records
,
tHalUint16
*
serviceHandle
);
Please give a calculation example for this parameter.Thanks,Maik