EmbDev.net

Forum: µC & Digital Electronics can't find the right CRC


von Gianni B. (gianni60)


Rate this post
useful
not useful
Hi,
I'm receiving some data from a serial port and I'm trying to understand 
the last byte witch kind of control it is but up to now I didn't find 
the answers.

These is the data stream of 8 messages:
Every message start with 0x02 (STX) and at the end there is the CRC(?) 
Byte
if inside the message there is a 0x02 a 0x00 is inserted (escape). This 
0x00 byte I have already eliminated

0x02 0x1D 0x11 0x6A 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00 
0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x67


0x02 0x26 0x13 0x79 0x4F 0x00 0x00 0x00 0x02 0x02 0x54 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x61


0x02 0x1D 0x11 0x6B 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00 
0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x68


0x02 0x26 0x14 0x7A 0x4F 0x00 0x00 0x00 0x02 0x00 0x44 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x17


0x02 0x1D 0x11 0x6C 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00 
0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x69


0x02 0x26 0x17 0x7A 0x4F 0x01 0x00 0x00 0x64 0x00 0xE1 0x00 0x00 0x00 
0x00 0x00 0x0D 0x01 0x01 0x00 0xFA 0x00 0xFA 0x01 0x90 0x01 0xB8 0x5A 
0x0F 0x00 0x64 0x27 0x10 0x00 0x0A 0x07 0xD0 0xB4


0x02 0x1D 0x11 0x6D 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00 
0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x6A


0x02 0x26 0x13 0x7A 0x4F 0x00 0x00 0x00 0x02 0x02 0x54 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x63

Anyone has some idea?

Regards

Gianni

von Pollux (Guest)


Rate this post
useful
not useful
Gianni B. wrote:

> 0x02 0x1D 0x11 0x6A 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00
> 0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> 0x67
>
> 0x02 0x1D 0x11 0x6B 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00
> 0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> 0x68
>
> 0x02 0x1D 0x11 0x6C 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00
> 0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> 0x69
>
> 0x02 0x1D 0x11 0x6D 0x58 0x00 0x00 0x01 0x00 0x00 0x10 0x00 0x00 0x00
> 0x00 0x00 0x00 0x80 0xFA 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> 0x6A

If you look at the above messages, only the 4th byte is incremented by 
one, and the last byte counts up as well. Therefore it is less likely 
that the last byte is a CRC. To me it looks like a sum, but I can't yet 
tell you how it's calculated.

von Bevitore di Ramazzotti (Guest)


Rate this post
useful
not useful
http://reveng.sourceforge.net/
CRC RevEng: arbitrary-precision CRC calculator and algorithm finder

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.