How to access parameters by UUID using Custom GATT service? | Cypress Semiconductor
How to access parameters by UUID using Custom GATT service?
I am using a custom GATT service as I have a set of data that does not fit in to any of the standard services.
Services have a 16-bit UUID e.g. 0xff01 and vary in size from 1 byte unsigned int to 8 bytes "long long" int. I have set up a peripheral device and can read these parameters with CySmart and the BLE Dongle. The particular fields that may be transmitted vary, depending on the type of sensor some fields may be omitted or protected.
Now, I want to read these parameters. I would need to create a CYBLE_GATTC_READ_BY_TYPE_REQ_T struct with parameters of the read. Here is where I have questions:
) What do I use for the startHandle and endHandle parameters in the range struct?
) Is the UUID specfied as a 16-bit integer (provided uuidFormat set correctly?)
After this, how can I read the data? The function CyBle_GattcReadUsingCharacteristicUuid returns only a status packet. So I guess it fills some struct somewhere?
Now, I have looked long and hard and cannot find documentation or consistent code samples for Custom profiles, only API documentation which does not explain much. I can see the methods for extracting data for heart rate profiles, etc. But that is not applicable to my project.
Thanks for any advice,