Rules for Escaping Characters

555

# Rules for Escaping Characters

When creating frame data, the sending end of the control PC needs to convert the file into hexadecimal (hex) code and then divide the file data into blocks to create frame data in the format mentioned above. If the file data contains data codes that are the same as the frame header or frame end, they need to be escaped.

Rule: The same byte is escaped as two bytes. 0x1B and this byte minus 0x1B

0x02 is converted to 0x1B 0xE7
0x03 is converted to 0x1B 0xE8
0x1B is converted to 0x1B 0x00
img