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

Reply
  • 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

Children
Related