This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to get Acknowledgement/Confirmation after sending an Indication ?

Hi,

We are sending a data using Nordic UART Service (NUS), the data is transferred over BLE as a Indication.

From Message Sequence Chart in Nordic Infocenter image description

Here it shows ATT Handle Value Confirmation(blue arrow from PEER to SD).

I have included BLE_GATTS_EVT_HVC event on transmitter side(Tx), and I am expecting a confirmation from receiver side(Rx).

Do I need to send that confirmation from Rx side manually or Softdevice handles it ?

  • Hi

    The idea behind the indication is that is has to be confirmed by the application, the SoftDevice won't do it for you.

    To do so you have to call the sd_ble_gattc_hv_confirm(..) function, after receiving the BLE_GATTC_EVT_HVX event.

    The main purpose of indications is to allow the application to confirm the packet only after it has fully processed the data, and completed any operations associated with it.
    If quick and efficient data transfer is more important I would recommend using notifications instead, you still have a link layer ACK to avoid packet loss/corruption.

    Best regards
    Torbjørn

Related