Skip to main content
Associate III
Mar 20, 2024 11:43 AM UTC
Solved

Get reception confirmation in BLE (indication)

I am using an STM32WB5MMG for a BLE application. The device acts as a server. I have configured a number of characteristics with indication permissions. How can I confirm the correct reception of the characteristics updates by the client? I mean, where can I get the indication confirmation?

Best regards and thanks.

This topic has been closed for replies.
FDumontKeller
FDumontKellerBest answer
Associate II
Mar 21, 2024 6:41 AM UTC

Hi @thealbertdev, 

If what you are looking for is some kind of event telling the CPU1 that the ACK from the client has been received, you can add the ACI_GATT_SERVER_CONFIRMATION_VSECT_CODE in the switch case of the function 
static SVCCTL_EvtAckStatus_t Custom_STM_Event_Handler(void *Event){} (if you are using the CubeMX BLE custom option) between the user code comments
/* USER CODE BEGIN BLECORE_EVT */
/* USER CODE END BLECORE_EVT */ 

Description of the event in the AN5270 

FDumontKeller_0-1711003109257.png

Hope this works as it worked for me. 

 

 

 

3 replies

FDumontKeller
FDumontKellerBest answer
Associate II
Mar 21, 2024 6:41 AM UTC

Hi @thealbertdev, 

If what you are looking for is some kind of event telling the CPU1 that the ACK from the client has been received, you can add the ACI_GATT_SERVER_CONFIRMATION_VSECT_CODE in the switch case of the function 
static SVCCTL_EvtAckStatus_t Custom_STM_Event_Handler(void *Event){} (if you are using the CubeMX BLE custom option) between the user code comments
/* USER CODE BEGIN BLECORE_EVT */
/* USER CODE END BLECORE_EVT */ 

Description of the event in the AN5270 

FDumontKeller_0-1711003109257.png

Hope this works as it worked for me. 

 

 

 

Associate III
Apr 26, 2024 2:02 PM UTC

Thank you!

Doing it as you indicate works. Although now that it is working, I can see that it is much more difficult to manage the non-receipt of the confirmation than the confirmation itself :grinning_face_with_sweat:

FDumontKeller
Associate II
Apr 26, 2024 2:09 PM UTC

well, sometimes you can't have it all. Setting some type of Timeout after the sending of data would help? there is this timer service (based on the RTC) which could help you out with this.