0

I've got an old devices which communicate through serial port. There's main device which send simple commands and then asked device responds. I've got almost all sorted out. The only thing left is the checksum. I've spend so much time on this but no idea pops out. Messages may vary in length, there's no length byte. Last byte is checksum I believe. Here's the data sample:

E1-7E-00-00-03
E1-7E-00-01-92
E1-E2-FE-00-00-D5
E1-E2-FE-00-01-44
E1-7D-00-00-B2
E1-7D-00-01-23
E1-E2-FD-00-00-64
E1-E2-FD-00-01-F5
E1-7C-00-00-62
E1-7C-00-01-F3
E1-E2-FC-00-00-B4
E1-E2-FC-00-01-25
E1-7B-00-00-11
E1-7B-00-01-80
E1-E2-FB-00-00-C7
E1-E2-FB-00-01-56
E1-7A-00-00-C1
E1-7A-00-01-50
E1-E2-FA-00-00-17
E1-E2-FA-00-01-86
E1-79-00-00-70
E1-79-00-01-E3-F1
E1-E2-F9-00-00-A6
E1-E2-F9-00-01-37
E1-78-00-00-0D-39-CB
E1-78-00-01-31
E1-E2-F8-00-00-76
E1-F8-00-01-E7
E1-77-00-01-07
E1-E2-F7-00-01-D1
E1-77-00-00-96
E1-E2-F7-00-00-40

E1 and E2 have no impact on checksum, cause I saw things like E1-E2-FE-38 and E1-FE-38. 7E, FE and so on are devices id. 7x is main device data and Fx is device response. Thanks in advance.

  • Hi, welcome to the RE stack exchange. You can try playing around with crc reveng, reveng.sourceforge.net I messed with it a little bit and it seems like if it is a crc the polynomial might be 0x91 – Avery3R Oct 21 '19 at 20:08
  • Hey, thanks alot! You are the best, I didn't even knew such a software exists. I found poly and init value. The software generates proper checksum for every data set i have. Now I have to implement the code, but I guess I'll sort that out. Thank you very much. Can't select your comment as an answer, but it will be the solution to most similar question I believe. – h2pc Oct 22 '19 at 12:54
  • Answer your own question with exactly what you did. My comment wasn't a full answer that's why I made it as a comment – Avery3R Oct 22 '19 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.