I have a data packet that states its data validation (check code) is verified by a double byte XOR. I've Googled for a tutorial and came up empty. I've tried to solve the puzzle in Excel to never get a match to serial data I captured with Putty. I could use a tip on how the algorithm to apply.
The packet description is below. Starting at position 8, the two byte CS item contains the check code and states it uses a double-byte XOR to verify the current data packet. I've tried adding up all bytes starting at Si in series which equates to a two byte value. I XOR it against the CS value I've assed to be xC4AD, but that didn't resolve to 0.
Should I be XORing blocks of 2 bytes and comparing to the CS value?
Example packet:
AA 55 00 28 85 AE 9D 0C AD C4 00 00 00 00 00 00 32 00 00 2A 12 59 12 00 00 00 00 A6 1F E5 1F 8D 1F 6D 1F 0A 17 7D 17 62 55 09 1D B1 10 31 10 4D 10 7A 0F 61 0F 5D 0F 21 0F 19 0F 31 0F 49 0F 8D 0F 4E 6D 6D 1D 82 0D 84 0D 00 00 AE 1A 9D 1A 89 1A |