Computer Interfacing
Discussions about interfacing and electronics

Can anyone tell me how to extract the crc out of this hex


       Computer Interfacing Forum Index -> Error detection and correction
Author Message

Apr 27, 2009 1:32 am

05 64 07 40 00 01 AA AA 00 00 36 3E

i believe the 363E is the crc the 05 64 is the header 07 is the length. any other information would be great.

Thanks for reading

Apr 27, 2009 1:34 am

sorry if this was unclear i would like to simulate this hex and send it to a product i am modifying but i cannot change the hex packet without knowing how to calculate the crc for the end. is there any other information you need before you could firgure out how to do it?
Preferred Member

Joined: 30 Oct 2007
Posts: 184
Location: London, UK

Apr 28, 2009 2:05 pm

Hello Chris, welcome to the forum.

I believe the CRC is the following:
Poly=$3d65  init=$0000  xorout=$ffff  refin=false  refout=false
(For an explanation of this record, see A Painless Guide to CRC Error Detection Algorithms by Ross Williams.)
(For a generic implementation in C, see A Painless Guide or the Calculator page.)

If so then the CRC is calculated on the packet starting with the length byte. All the values above are reasonable (Poly is the same as in DNP) but as there is only one packet this result may be a fluke.



       Computer Interfacing Forum Index -> Error detection and correction
Page 1 of 1

Running on php BB © 2001, 2009 php BB Group
   Lammert Bies     Interfacing     Sitemap     Forum