The application protocol uses a request/answer mechanism, where all requests are initiated by the asset.
#PROTOCOL STX ETX SERIAL#
The last row of the table shows the bytes sent over the serial link. This is encoded to 0x34 (‘4’) and 0x38 (‘8’), So our example array becomes: H Take the first character H above, which is 0x48. This hex data is encoded as high and low nibbles. We will work with our data as bytes or collections of bytes with a value 0x00 to 0xFF. We will work in the hex notation.įor example, the ASCII string Hello World! can be represented as a hex array 0x48 0圆5 0圆C 0圆C 0圆F 0x20 0x57 0圆F 0x72 0圆C 0圆4 0x21. This can be illustrated with some examples.įirst, consider that the same data can have a variety of representations. Add STX and ETX, which gives the result to be sent over the UART: Īll data in the protocol is converted to hex strings for transport.Compute the CRC as 0x54C3 and append it:.