How to handle the data even BLE is disconnected?

Manigandan gravatar image

asked 2017-08-10 07:15:02 +0200


I am using ble_app_uart for my development, in that I have buffer size of 2kB which will store all the incoming data and the data will be processed and send over NUS service. But some times BLE (peripheral) is getting disconnected from the central device and some data is getting lost. So I want to change my code so that data should not be lost even after disconnection and once again after the connection establishment data can be sent to central device.

Suggest me to do this....

edit retag flag offensive close delete report spam

1 answer

Sort by ยป oldest newest most voted
run_ar gravatar image

answered 2017-08-11 17:24:01 +0200

This can probably be done in several ways. The safest way is probably to calculate a CRC over multiple packets to check that they have been transmitted, using a control channel to acknowledge this. Something similar to what we are doing in our DFU example.

You could also keep track of the BLE_GATTS_EVT_HVN_TX_COMPLETE event which is generated when a Handle Value Notification transmission complete. Note that several notifications can be confirmed in the same event, so check the count field in the tx_complete field.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-08-10 07:15:02 +0200

Seen: 42 times

Last updated: Aug 11