cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hi,

   

 

   

I am using BLE Pioneer Kit (CY8CKIT-042-BLE).

   

 

   

1. I made custom profile including just one Service which include just one Characteristic (only 1 byte uint8 data field).

   

2. I excuted CySmart on my smartphone and tried to GATT read data.

   

3. I found CYBLE_EVT_GATTS_READ_CHAR_VAL_ACCESS_REQ was received.

   

 

   

I have no idea what I should do after CYBLE_EVT_GATTS_READ_CHAR_VAL_ACCESS_REQ is received.

   

I think there might be some API function by which I can send response including "1 byte uint8 data" to the GATT client, but I couldn't find it.
Can you please let me get sample code about that or some advice?

   

 

   

Thank you,

   

William.

0 Likes
1 Solution
HeLi_263931
Honored Contributor II

You don't actually respond to an attribute read request. The GATT server code (what you are working on) just sets the new attribute value. Then the BLE stack will send this value to the GATT client when it reads it. Look at AN91162 for how to implement a custom service.

View solution in original post

0 Likes
1 Reply
HeLi_263931
Honored Contributor II

You don't actually respond to an attribute read request. The GATT server code (what you are working on) just sets the new attribute value. Then the BLE stack will send this value to the GATT client when it reads it. Look at AN91162 for how to implement a custom service.

View solution in original post

0 Likes