You are here

How to access parameters by UUID using Custom GATT service? | Cypress Semiconductor

How to access parameters by UUID using Custom GATT service?

Summary: 3 Replies, Latest post by brstvo_1480201 on 15 Oct 2015 12:46 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
tom66's picture
21 posts

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,

BMAH's picture
Cypress Employee
189 posts


Please have a look at the following AN:

AN91162 - Creating a BLE Custom Profile



brstvo_1480201's picture
4 posts

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?

brstvo_1480201's picture
4 posts

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. 

Log in to post new comments.