1 of 1 people found this helpful
In BLE all the transmission is done in link layer. The link layer has the buffer which stores the data to be transmitted and the instructions. So the application layer APIs will not know whether the data is transmitted or not. The reason is the
You can do following thing:
1. Use Indication instead of Notification. For indicaton, the sender will call the API Cy_BLE_GATTS_SendIndication() and
the receiver(Client) will get an event CY_BLE_EVT_GATTC_HANDLE_VALUE_IND . The client should respond back to the server when the data is received by calling an API Cy_BLE_GATTC_SendConfirmation. At Server side you will get another event CY_BLE_EVT_GATTS_HANDLE_VALUE_CNF that the data is successfully reached at Client side.
Using this ways the sender will know whether the data reached safely of not.
Please refer PDL--> BLE Middleware library for more information.
You can also see WriteWithoutresponse API for GATT Client which is actually a blocking API where the API result is success only after the transmission. Unfortunately there is no blocking API for Notification or Indication.