You are here

Cypress Read Event? | Cypress Semiconductor

Cypress Read Event?

Summary: 2 Replies, Latest post by TDBConsulting_1416776 on 02 Sep 2015 05:12 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
TDBConsulting_1416776's picture
51 posts

This question is for a Cypress BLE device configured as a Peripheral with a Custom Profile:

When a Central BLE device writes to a Cypress Peripheral BLE device, the Cypress event handler API function (e.g. EventHandler(uint32 event, void *eventParam)) is called with the CYBLE_EVT_GATTS_WRITE_REQ event set. The value to be written may be acquired from the event handler parameter (e.g. wrReqParam->handleValPair.value.val where wrReqParam = (CYBLE_GATTS_WRITE_REQ_PARAM_T *)eventParam;). Apparently, the actual write is performed by calling the function CyBle_GattsWriteAttributeValue() and an acknowledgement response is sent to the Central device by calling the function CyBle_GattsWriteRsp(cyBle_connHandle);


Is there such an event and functions for a Read?

That is, is there, for example, a CYBLE_EVT_GATTS_READ_REQ event and CyBle_GattsReadRsp(cyBle_connHandle) function (or similar)?

I ask this because the Microchip RN4020 has a Real-time Read feature (SR,40000000) that I would like to perform using the Cypress device. Microchip describes that Real-time Read feature bit as follows:

"If set, the device request values from the host MCU through the UART and the host MCU must respond in a timely manner. If cleared, the device reads from the internal RAM of the RN4020 for the characteristic values that were previously set."

Thank you all,

Tim Ball

roit's picture
Cypress Employee
221 posts


In short, no. There is no event generated for Read request sent from a Client device.

The reason is that the read request is handled by the BLE Stack automatically. The only thing to do is to update the Characteristic value by using CyBle_GattsWriteAttributeValue() API and appropriate attribute handler. Whenever the Read request arrives, the stack sends the latest value in its GATT DB (the one updated by application using the API) to the requesting device.

TDBConsulting_1416776's picture
51 posts


Thank you for your response and the information.



Log in to post new comments.