How to access parameters by UUID using Custom GATT service?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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,

0 Likes
3 Replies
Anonymous
Not applicable

Hi,

   

Please have a look at the following AN:

   

AN91162 - Creating a BLE Custom Profile

   

Link: http://www.cypress.com/documentation/application-notes/an91162-creating-ble-custom-profile

0 Likes
Anonymous
Not applicable

Have the similar problem.

   

I use cy5670 dongle as master and nrf8001 as peripheral. I took UART_to_BLE example as a frame. Devices had been connected, but master (dongle) couldn't discover primary services using But CyBle_GattcReadUsingCharacteristicUuid or CyBle_GattcDiscoverAllPrimaryServices. Have anyone else met such a problem?

0 Likes
Anonymous
Not applicable

Finally I "solved" the problem. Somewhy, master device can't discover service with uuid, which differs from that one, which is used in the initial uart_to_ble example. 

0 Likes