2023-04-24 02:19 AM
Hey!!
I have a BLE application which runs on custom server profile. There are few characteristics of a given service, where the client can modify them. I want to read these characteristics once they are updated by the client. I have tried to use "aci_gatt_read_handle_value" API but I'm not sure whether my implementation is correct or not.
My implementation:
ZoneConfigurationStatus_t zoneStatus;
aci_gatt_read_handle_value(CustomContext.CustomZone_Configuration_StatusHdle, 0, SizeZone_Configuration_Status, &SizeZone_Configuration_Status, &SizeZone_Configuration_Status, &zoneStatus);
LOG_DEBUG("zoneStatus :%d", zoneStatus);
Can anyone help me out with this?
Thanks,
Akash
Solved! Go to Solution.
2023-04-25 01:19 AM
Hello,
Using aci_gatt_read_handle_value command is the right way to read an attribute value from the local database. The handle of the value attribute is the characteristic handle + 1.
So, in your case the first parameter of aci_gatt_read_handle_value command should be CustomContext.CustomZone_Configuration_StatusHdle + 1
Best Regards
2023-04-25 01:19 AM
Hello,
Using aci_gatt_read_handle_value command is the right way to read an attribute value from the local database. The handle of the value attribute is the characteristic handle + 1.
So, in your case the first parameter of aci_gatt_read_handle_value command should be CustomContext.CustomZone_Configuration_StatusHdle + 1
Best Regards
2023-04-25 04:20 AM
@Remy ISSALYS
Thanks. This change is working