Computer Interfacing
Discussions about interfacing and electronics

Which CRC calculation?

Trying to figure out the CRC algorithm used


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

Mar 06, 2015 7:11 pm

Hi Folks, I'm trying to re-implement a serial communications protocol and am stuck on the CRC calculation. An earlier implementation of this protocol used a simple one-byte checksum, but it doesn't look like its going to be quite that easy here with the newer implementation.

Here is a dump of the serial messages sent from the host software to the end device (responses omitted). Its a modbus-y type protocol (but definitely not modbus). This is what I've deciphered so far.


Example message: .00110050050E4BE.

|   .  |   001|  10|  050| 050 |    E4BE|   .   |
|Header|Device|Func|Start| reg |Checksum|trailer|
| Char | Addr |code|Addr |count|   ???  | Char  |

I haven't figured out the longer messages, but they have non-hex ascii characters which is probably a clue to the checksum. These are the messages sent from the host to the device.



Any thoughts would be greatly appreciated.


Mar 07, 2015 1:31 am

I was able to change the address in the host software, so I can generate some messages that only differ by one character. I'm pretty sure the last 4 characters are the CRC, but I'm still having trouble figuring out the algorithm.






Mar 17, 2015 1:53 am

Answer is posted at stackoverflow. I cant post it here. Search for unknown-crc-calculation question #28919221

       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