2017-02-28 01:05 AM
Hi,
I am working on Sensortile kit with the BlueNRG-MS radio.
As per ST document PM0237 section 3.3, pg 55/99, following commands are used to add custom service to BLE device :
//Add the service with service_uuid 128bits UUID
aci_gatt_add_serv(UUID_TYPE_
128, service_uuid, PRIMARY_SERVICE,
7
,&ServHandle);
//Add the characteristic with charUuid_1 128bits UUID
aci_gatt_add_char(ServHandle, UUID_TYPE_128, charUuid_1, 20,
CHAR_PROP_NOTIFY, ATTR_PERMISSION_NONE, 0,16, 1, &CharHandle_1);
//Add the characteristic with charUuid_2 128bits UUID
aci_gatt_add_char(ServHandle, UUID_TYPE_128, charUuid_2, 20,
CHAR_PROP_WRITE|CHAR_PROP_
WRITE_WITHOUT_RESP, ATTR_PERMISSION_NONE,
GATT_NOTIFY_ATTRIBUTE_WRITE,
16, 1, &CharHandle_2);
In above 7 indicates the maximum number of attribute records that can be added to this service. However, as per my understanding BlueNRG-MS always adds 6 mandatory attribute records in any custom service. So for above example, the maximum number of attribute records would be :
6(mandatory attribute records) + 1 (charUuid_1 attribute) + 1 (charUuid_2 attribute) = 8 attribute records
What is incorrect in the above calculated value of 8 as the maximum number of attribute records ? As 7 is used as the maximum number of attribute records in above example.
Any help on above would be appreciated.
2017-02-28 04:32 AM
You may want to repost/share this question in
https://community.st.com/community/interface-and-connectivity-ics/content
JW