Showing results for 
Search instead for 
Did you mean: 


Not applicable

I am trying to read values from a BLE server on one module using a Pioneer Kit as the Client so that I can hook up the Bridge Control Panel to the client via USB->I2C and plot the results.


I've taken the 100 Projects In 100 Days, Days #035 and #036 as my template, but I want to convert notifications to reads and as the service on the server module is a custom service it has a 128 bit UUID. I trigger a read using the following function:


void ReadPadsValues(void) {
    CYBLE_API_RESULT_T api_result;
    CYBLE_GATTC_READ_BY_TYPE_REQ_T *cyBle_readreq;


    cyBle_readreq->range = attrHandleRange;
    cyBle_readreq->uuid = PadsCharUuid;
    cyBle_readreq->uuidFormat = CYBLE_GATT_128_BIT_UUID_FORMAT;
    api_result = CyBle_GattcReadUsingCharacteristicUuid(cyBle_connHandle, cyBle_readreq);


I have tried to initialise PadsCharUuid with my service UUID as a CYBLE_UUID_T type, like this:


CYBLE_UUID_T PadsCharUuid = {.uuid128 = {0x00u, 0x31u, 0x01u, 0x9Bu, 0x5Fu, 0x80u, 0x00u, 0x00u, \
                                         0x80u, 0x00u, 0x10u, 0x00u, 0x01u, 0xCBu, 0x03u, 0x00u}};


But in the automatically generated file BLE_StackGatt.h, GATT_SUPPORT_128_BIT_UUID is not defined, so the type CYBLE_UUID_T does not include the uuid128 portion of the union. So I get a warning when trying to initialise PadsCharUuid.


Is there a way in the tools to cause GATT_SUPPORT_128_BIT_UUID to be defined? Or is there a specific reason why it isn't, and am I going about it the wrong way.


Many thanks in advance.



1 Solution
Not applicable

Hi Hli,


Thanks for looking at this again. By this I guess you mean that when I click on the Custom Service under the "Profiles" tab, there is a box to enter a UUID on the right with a pull down to the right allowing 16-bit, 32-bit or 128-bit UUID's. My custom service does have a 128-bit UUID, but this doesn't result in GATT_SUPPORT_128_BIT_UUID being #defined in BLEStackGatt.h. This means that I am unable to assign a 128-bit value to a variable of type CYBLE_UUID_T. Perhaps this is a bug in PSoC Creator 3.3. I'll flag it as an issue.


In the meantime I have solved my problem by migrating to using CyBle_GattcReadCharacteristicValue which requires the handle of the service rather than the UUID, thus avoiding the problem.


Once again, thanks for your contribution.





View solution in original post

4 Replies