Acknowledgements and Negative Acknowledgements
Now that we’ve seen how to send instructions to the Air Bridge one-to-any, let’s go over how the Air Bridge one-to-any can respond.
A response from an Air Bridge one-to-any comes in one of two forms: An Acknowledgement (ACK), meaning everything has gone well and the device is reporting the instructions were carried out, or a Negative Acknowledgement (NAK), meaning something has possibly gone wrong and the Air Bridge is returning one of 13 Negative Response Codes (NRC).
Acknowledgements
Typically, an ACK comes as a single-frame message structured similarly as the frame sent to the device. Commands simply return the RSID in acknowledgement of receiving it and the SIL set to 3 as the ACK doesn’t need to contain any data bytes. For Requests such as reading a parameter, the ACK will also include the data from the parameter as requested and can respond via multi-frame message if necessary.
Negative Acknowledgements
In place of the SID, a NAK will return 1111, the NAK discriminator, followed by the SID that was not able to be acted upon in the next byte, and finally a Negative Response Code (NRC) for additional context as to why the SID was deemed unactionable. In total there are 13 NRC and are listed as follows:
0x10: NRC_GENERAL_REJECT
0x11: NRC_SERVICE_NOT_SUPPORTED
0x13: NRC_INCORRECT_MESSAGE_LENGTH_OR_INVALID_FORMAT
0x14: NRC_REMOTE_UNAVAILABLE
0x31: NRC_REQUEST_OUT_OF_RANGE
0x33: NRC_SECURITY_ACCESS_DENIED
0x72: NRC_GENERAL_COMMAND_ERROR
0x78: NRC_PENDING
0x7E: NRC_SUBFUNC_NOT_SUPPORTED_IN_ACTIVE_SESSION
0x7F: NRC_SERVICE_NOT_SUPPORTED_IN_ACTIVE_SESSION
0x80: NRC_INVALID_PARAMETER
0x81: NRC_INVALID_STATE
0x82: NRC_INVALID_ROLE