ACK/NACK in NUS sample code

Hi, 

Does Central or Peripheral UART enable ACK/NACK in the code for BLE communication? 
How does Peripheral recognize if Central has received all the data ? Is there any ACK for the same ?


Regards
Thank you 
Pallavi 

Parents
  • Hi

    The UART itself doesn't do ACK/NACK, and this happens in the Bluetooth LE Link Layer. The link layer uses 2 bits for acknowledgement: transmitSeqNum and nextExpectedSeqNum called SN and NESN bits from the packet

    • When receiving a packet, the device compares the packet's NESN with its own sn
    • If they match, it's considered a NACK (negative acknowledgment)
    • If they don't match, it's considered an ACK (acknowledgment)

    Best regards,

    Simon

  • Hi  
    Thank you for the reply. I have understood the concept.

    Where can we find this in the code?

    I have read that Notify characteristic doesn't give ACK/NACK, is it TRUE?
    If so, what should I do to reduce data loss? 
    Should I change to Notify to Indications?

    Regards
    Thank you 

Reply Children
No Data
Related