77
4-3 CMD_NAK
Description: Negative acknowledgment of received packet
Packet Format
Length
Opcode Status Cause Checksum
0x04
0x4E
(‘N’)
Field Descriptions
Table 4-4 Field Descriptions
Field Name
Format
Size
Description
Length
Length of message (not
including checksum).
1 Byte
Length Field
Opcode
0x4E
1 Byte
Identifies the opcode type.
Status
Bit 0:Retransmit
Bit 1-6:Unused
Bit 7: Command source
1 Byte
Bit 0: Identifies the transmission status.
Bit 7:1, Command is from the host.
0, Command is from the scanner.
All unused bits must be set to 0.
Cause
Reason code
1 Byte
Identifies the reason the NAK occurred:
Bit 0 = busy, the scanner is executing a
command.
Bit 1=(NAK_RESEND) Checksum failure.
Bit 2=(NAK_BAD_CONTEXT) Unexpected or
Unknown message
Bit 3=(NAK_DENIED)
Bit 4=Reserved
Bit 5=Reserved
Bit 6=(NAK_NO_PARA) the parameters
wishing to change do not exist
Bit 7=(NAK_OUT_OF_RANGE) the
parameters wishing to change exceed the
range
Checksum
2's complement sum of
message
contents
excluding checksum.
2 Bytes Checksum of message.
This message is sent when the received packet fails the checksum verification or some error occurred
while handling the message. If the scanner received NAK within this time period, it sends the previous
message again. The scanner retries twice before declaring a transmit error. The engine only resends a
message twice. If the message is not sent successfully either time, the engine declares a transmit error