57 api / vcom commands appendix, Message format, Message format sending / receiving- breakdown – Hatteland Display HT B22 (Fanless) User Manual

Page 57

Advertising
background image

57

API / VCOM Commands

Appendix

IND100077-132

Message Format

The basic message format shall be as follows and sent to the Internal Virtual COM (VCOM) port:

Byte #

0

1

2

3

4

5

6

7..etc

End Byte

ATTN

ADDR

CMD

CMD

CMD

LEN

IHCHK

DATA

IDCHK

The minimum message size is 7 bytes (0x07). The maximum message size is 82 bytes (0x52), consistent with the

EN61162-1 standard. Every byte sent are viewed in this document as HEX values and are based on standard

characters in the ASCII table (0 to 255) to send or receive messages in a human readable input/output. No further

decoding or decrypting functionality is needed or required. Every command sent are always ended with a 0x00 (null

byte terminator).

Message Format Sending / Receiving- Breakdown

ATTN, Byte 0 Description - Attention
0x07

Sent Command, also known as ASCII BELL

0x06

Acknowledge (Command successfull), also known as ASCII ACK

0x15

Negative Acknowledge (Command not successfull), also known as ASCII NAK

ADDR, Byte 1 Description - Address
0xFF

Broadcast - Addressed to local unit

CMD, Byte 2,3,4 - Command
Byte 2

Byte 3

Byte 4

ASCII

Description

I/O

0x53

0x57

0x49

"SWI"

Retrieve Internal Software version

Read Only

0x51

0x44

0x55

"QDU"

QM57 Chipset Duplex Mode

Write Only

LEN, Byte 5

Description - Data Length

0x??

This single byte defines the length of DATA in the message in bytes. The maximum value for this field is 74 bytes (0x4A in

HEX). The minimum value is 0 bytes (0x00 in HEX).

IHCHK, Byte 6 Description - Inverse Header Checksum
0x??

This single byte is a simple 8-bit checksum of the header data, message bytes 0 to 5 on which a bit-wise inversion has been

performed. The checksum shall be initialised to 0. The 8-bit sum (without carry) of bytes 0, 1, 2, 3, 4, 5 and 6 shall be 0xFF

(255 in value). If the unit receives a message with an incorrect checksum, the unit will reply with the attention code set to NAK

and no data field.

DATA, Byte 7..etc Description - Data Field
0x??

The single byte is the DATA field which shall only be transmitted if LEN is greater than 0. This field depends on the CMD

transmitted.

IDCHK, End Byte Description - Inverse Data Checksum
0x??

This single byte shall only be transmitted if LEN is greater than 0. This is a simple 8-bit checksum of the data field,

message bytes 7 to 7+(LEN-1) on which a bit-wise inversion has been performed. The checksum shall be initialised to 0.

The 8-bit sum (without carry) of bytes 7 through 7+LEN inclusive shall be 0xFF. The receiver will reply to any message

that the checksum has failed with the attention code set to NAK. Basically this byte is located at the very end of a received

stream.

Advertising