cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

AlAd_4179981
New Contributor II

Hi,

I was wondering is there an event or any way to indicate BLE tx transmission complete.

for example when a peripheral device sends a notification, how to know that the tx transmission complete.

regards,

Ali

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator

Hi Ali,

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.

Thanks

Ganesh

View solution in original post

1 Reply
VenkataD_41
Moderator
Moderator

Hi Ali,

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.

Thanks

Ganesh

View solution in original post