I am trying to decode/understand a serial (UART) communication protocol between a PC app and a "device". I have connected a UART spy on the lines so I can see what is there. What I got so far is the baudrate, parity, number of bits, stop bits. The communication is in plain text, with requests from PC and responses from "device". A request/response packet starts with '(' and ends with ')' char.
The last 2 chars, before the ending ')' char, is some sort of 8 bit CRC or checksum. But I can't figure out what sort of algorithm is used to compute this CRC/checksum.
Example of packet, with 10 char sent over UART interface:
in hexa, these 10 Bytes transmitted are:
0x28 0x52 0x31 0x30 0x32 0x30 0x30 0x36 0x31 0x29 ( R 1 0 2 0 0 6 1 )
0200 is some kind of 16 bit hex address (0x0200). The last 2 chars at the ending, before the terminal ')' char, are 6 and 1. This appears to be the 8 bit hex number 0x61. This is some sort of 8 bit CRC/checksum. But how is this computed ?
I have several examples of packets, with different CRC/checksum:
(R22A0013) (R22C0011) (R2460062) (R248006C) (R2570062) (R25B0017) (R269006F) (R26D0012) (R26F0010) (R1020061) (R1040067) (R1050066) (R1060065) (R1070064) (R108006B) (R109006A) (R10A0012) (R10B0011) (R10C0010) (R10D0017) (R10E0016) (R10F0015) (R1100062) (R1110063) (R1120060) (R1130061) (R1150067) (R1160064) (R119006B) (R11A0013) (R12F0017) (R1340064) (R1350065) (R1360066) (R1370067) (R13C0013) (R1450062) (R14A0016) (R14B0015) (R14C0014) (R14D0013) (R14E0012) (R4300065) (R438006D) (R43D0011) (R4410063) (R4750064) (R4710060) (R4790068)
Anyone knows how to compute the CRC/checksum at the end of these packets ?