I have a device that is connected via a serial port to my PC, and I'm trying to figure out how it sends data. (to make a long story short) I have an app that can instruct it to send text to me over serial, and I'm trying to figure out how the device formats the data. So far, I've sleuthed out that for example:
If I send: 'Palindromes', I will see:
A1 87 66 9D D9 39 6F DB 97 98 00
The ASCII data for 'Palindromes' is
P a l i n d r o m e s
50 61 6C 69 6E 64 72 6F 6D 65 73
If i shift each byte by position (+1) in the stream I get
P a l i n d r o m e s
50 61 6C 69 6E 64 72 6F 6D 65 73 <-- ASCII
01 02 03 04 05 06 07 08 09 0A 0B <-- shift
--------------------------------
03 98 00 <-- 73 << 0B = 039800
01 94 00 <-- 65 << 0A = 019400
DA 00 <-- 6D << 09 = DA00
6F 00 <-- 6F << 08 = 6F00
39 00 <-- 72 << 07 = 3900
19 00 <-- 64 << 06 = 1900
0D C0 <-- 6E << 05 = 0DC0
06 90 <-- 69 << 04 = 0690
03 60 <-- 6C << 03 = 0360
01 84 <-- 61 << 02 = 0184
A0 <-- 50 << 01 = A0
--------------------------------
A1 87 66 9D D9 39 6F DB 97 98 00
I've experimented with strings of varying size and the algorithm fits the bill.
Is there some sort of protocol(s) that does this? If so, which ones?
Thankful for any direction