cancel
Showing results for 
Search instead for 
Did you mean: 

Making BLE Application lossless on STM32WB5MMGH

SA.14
Associate

We have implemented BLE application on STM32WB5MMGH. I see that some of the BLE packets are getting lost in transit. The peripheral and the master are in very close proximity. I understand that packets can get lost depending on environment but my question is how to make the communication lossless. Doesn't BLE protocol, in general, provide a lossless option for communication - aka acknowledgements?? Based on the protocol, I see that using 'indication' is a way to make that happen. Is that correct? Since I took over most of the code base, and am somewhat new to the whole BLE application, can someone help me figure out things to check to make sure the application is setup for a lossless communication. I'm not concerned about latency, i'm more interested in having a lossless communication for this application. Any suggestions, advice is greatly appreciated. Thank you.

1 REPLY 1
Remy ISSALYS
ST Employee

Hello,

In order to reduce the number of BLE packets lost, in a first time, you can check the status return by the function aci_gatt_update_char_value and if the status is equal to BLE_STATUS_INSUFFICIENT_RESOURCES, you need to wait and retry to send your packet.

You can also used the indication instead of notification, when indications are used, a confirmation by the client is awaited. In this case, you have the following exchange:

Server sends aci_gatt_update_char_value

Client receives aci_gatt_indication_event, and needs to answer aci_gatt_confirm_indication

Server receives aci_gatt_server_confirmation_event

Then a new aci_gatt_update_char_value can be sent.

Best Regards