Customizing Read Response to Read Request over BLE Charactertistics from Application with latency

Hi OnSemi,
There is a requirement to construct a read request-response mechanism in the application.
The mechanism is as follows -

  1. Client requests READ on a Custom BLE characteristic.
  2. Server RSL10 receives the READ request.
  3. Performs a certain set of activities necessary to prepare READ response on the characteristic.
  4. After a few seconds of delay, constructs a READ response and shares it back to Client over the custom characteristic.

I have seen an implementation in another controller, using kernel messages, the BLE task is set to BUSY state - ‘ke_busy’ until the operation within the application is completed.

How to construct the above described READ request-response in “peripheral_server_sleep” example application.

Thank you
Raju
Honeywell

@rajucoolsuraj
You can modify ble_custom.c in peripheral_server _sleep example.

and how it looks at the RSL 10 Dongle (Client).

When Client ask read, the server side will have GATTC_ReadReqInd and prepare data for read data.
If server doesn’t want to let client read data (or tell client this value is not valid), he can put status to " ATT_ERR_INVALID_PDU".

Thank you for using our community forum!