Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Calculating Checksum From a Hex String

Status
Not open for further replies.

AshleyE

Newbie level 3
Joined
Dec 18, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Miami, FL
Activity points
28
Hey Everyone!

I'm new on the forums here, but have been lurking in the background for a while searching for answers to my problem. I have what seems to be a string of HEX data that has a counter and a checksum built in. The system is a simple controller area network with several modules. I would like to decode the checksum data so I can output similar data on another network without errors. Any help would be greatly appreciated :)

Code:
0x03	0xF1	0xC8	0xFF	0xDF	0xFF	0x00	0x75
0x04	0x03	0xC9	0x09	0xDF	0xFF	0x10	0xBB
0x04	0x03	0xC9	0x09	0xDF	0xFF	0x20	0xF1
0x04	0x07	0xC9	0x0D	0xDF	0xFF	0x30	0x77
0x04	0x07	0xC8	0xFB	0xDF	0xFF	0x40	0xE3
0x03	0xFE	0xC8	0xFD	0xDF	0xFF	0x50	0x49
0x04	0x0A	0xC9	0x01	0xDF	0xFF	0x60	0x32
0x04	0x03	0xC8	0xF6	0xDF	0xFF	0x70	0xE3
0x04	0x0A	0xC8	0xF1	0xDF	0xFF	0x80	0x24
0x03	0xFD	0xC8	0xF1	0xDF	0xFF	0x90	0x64
0x04	0x01	0xC8	0xF7	0xDF	0xFF	0xA0	0x0A
0x04	0x01	0xC9	0x00	0xDF	0xFF	0xB0	0x97
0x03	0xFB	0xC8	0xFC	0xDF	0xFF	0xC0	0x7C
0x04	0x05	0xC8	0xF6	0xDF	0xFF	0xD0	0xCB
0x03	0xF8	0xC8	0xFB	0xDF	0xFF	0xE0	0xC5
0x03	0xF9	0xC8	0xF8	0xDF	0xFF	0xF0	0xF4
0x03	0xF9	0xC8	0xF8	0xDF	0xFF	0x00	0x8B
0x03	0xFB	0xC9	0x0A	0xDF	0xFF	0x10	0x49
0x03	0xFB	0xC9	0x09	0xDF	0xFF	0x20	0xB9
 
Last edited by a moderator:

You need to know the math rule for decode these data. In other words, unless having either the number which was added or the original data that was used for generate this table, no much can be performed to determine something here.
 

You need to know the math rule for decode these data. In other words, unless having either the number which was added or the original data that was used for generate this table, no much can be performed to determine something here.
I don't know the math calculation behind the data. I do know that bytes 0-3 are data being generated by specific inputs and that bytes 4-5 are constant. Byte 6 is a rolling counter that repeats, and byte 7 is the generated checksum data. That's where I get lost. I have run a few different checksum calculations on the data and nothing I have done proves.
 

I also performed some calculations just adding bytes from 0 up to 6 at each row and taking the difference on 7th column from a row to another, but could not find any constant correlation, so that I presume there was applied a more complicated rule than a simple checksum.
 

It's not related to any of the standard CRC-8 polynomials: i.e. 0x07, 0x31, 0xD5, 0x1D, or 0x9B. Nor is it a one's complement checksum. What protocol is generating the data?
 

How sure are you that it is a check-sum?
 

What protocol is generating the data?

Data on bytes 0-3 are generated by input sensors and 4-5 are always static values.

How sure are you that it is a check-sum?

I'm not really. I was told by the engineer that sampled the data that it was. I do know that if the data in bytes 0-5 is constant and the counter on byte 6 is running the data on byte 7 repeats in sequence with the counter. Then if data is changed on any other bytes 0-5 the data also changes in byte 7. Using that simple logic we determined it must be a checksum of some nature.
 

I'm not really. I was told by the engineer that sampled the data that it was. I do know that if the data in bytes 0-5 is constant and the counter on byte 6 is running the data on byte 7 repeats in sequence with the counter. Then if data is changed on any other bytes 0-5 the data also changes in byte 7. Using that simple logic we determined it must be a checksum of some nature.

You may have to decode this using cypto techniques as what you are trying to do is find the polynomial that generates the checksum.

I also verified it's not some kind of bitwise parity.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top