Checksum method determination

R

rjfjohnson

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

I have a commercial program that can communicate with the device, and a
serial port sniffer, and so I am able to get any number of sample
checksum digits. Below is a list of some.

I keep finding patterns, and it seems to revolve around the magic
number of 7.

If anyone could please help find this out, or does anyone know of a
brute-force method of determining a checksum?

Thanks,
Ryan Johnson.



1255 | 4
1265 | 7
1256 | 7
1355 | 5
3455 | 0
2455 | 1
1455 | 2
455 | 3
3355 | 7
2355 | 6
1355 | 5
355 | 4
255 | 5
1255 | 4
2255 | 7
3255 | 6
4255 | 1
425 | 4
1 | 6
2 | 5
3 | 4
4 | 3
5 | 2
6 | 1
7 | 0
8 | ?
9 | >
10 | 6
11 | 7
12 | 4
13 | 5
14 | 2
15 | 3
16 | 0
17 | 1
18 | >
19 | ?
21 | 4
23 | 6
2 | 5
22 | 7
222 | 5
3333 | 7

3 | 4
33 | 7
333 | 4
3333 | 7

123456789123456789 | 9

45 | 6
56 | 4
3567 | 0
3566 | 1
356 | 7
1234 | 3
123 | 7
 
K

Keith Thompson

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.
[snip]

This has nothing to do with the C programming language. Please limit
followups to sci.crypt, comp.programming, and sci.math, or to some
appropriate subset.
 
F

Flash Gordon

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

<snip>

What is your C question? I don't read the other groups, so I can't
comment on topicality there, but on comp.lang.c we deal with the C
programming language, not general programming problems.

Once you know the appropriate algorithm and have hit problems
implementing it in standard C you can bring those problems to
comp.lang.c, but until you are at the point of having C problems it is
the wrong place.
 
J

Jeremy Boden

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

I have a commercial program that can communicate with the device, and a
serial port sniffer, and so I am able to get any number of sample
checksum digits. Below is a list of some.

I keep finding patterns, and it seems to revolve around the magic
number of 7.

If anyone could please help find this out, or does anyone know of a
brute-force method of determining a checksum?

Thanks,
Ryan Johnson.
.... <data snipped>

The 0 - 7 values would seem to indicate that you only get 3 bits back.
Note the results of inputting 8 or 9.
Perhaps you have some kind of shift register???
 
L

Luc The Perverse

If anyone could please help find this out, or does anyone know of a
brute-force method of determining a checksum?


??? Your question doesn't even make sense. Are you sure you know what you
are asking?

Yes I am familiar with one way of bruteforcing a checksum but checksum
collisions could throw you off - of course it is the same way you bruteforce
just about anything.
 
R

rjfjohnson

Jeremy,

Thanks for your reply. In my efforts, I found some code for a BASIC
stamp which used something to do with shift registers... What exactly
are these?

Ryan
 
I

Ian Collins

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.
Not a language specific question, choose your groups with more care and
look up parity.
 
R

rjfjohnson

Thank you,

The answer was to do with parity

temp XOR temp+1 where temp is the number
 
Z

Zara

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

I have a commercial program that can communicate with the device, and a
serial port sniffer, and so I am able to get any number of sample
checksum digits. Below is a list of some.

I keep finding patterns, and it seems to revolve around the magic
number of 7.

You must take the xor of all digits of the number considered as binary
values in the range o-15. The resul soulb xor'ed with 7, and the
number added to char '0' to get the checksum char
For instance:


1255 | 4 => (1 ^ 2 ^5^5^7)+'0'='4'
8 | ? => (8^7)+'0'='?'


If anyone could please help find this out, or does anyone know of a
brute-force method of determining a checksum?

Instinct, and some counts
Thanks,
Ryan Johnson.

BTW, this thread seems completely off-topic


Best regrads,

Zara
 
S

Shmuel (Seymour J.) Metz

In <[email protected]>, on
02/02/2006
at 04:00 PM, (e-mail address removed) said:
I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

Read the documentation on the serial device in question. Then google
for CRC, assuming that's what it uses.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to (e-mail address removed)
 
T

Troky

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

It looks like chksum=7 XOR digit0 XOR digit1 XOR digit2....
 
A

anonymous

Hey,

I am trying to communicate with serial device and I need to know the
method used to calculate the 1digit checksum.

I have a commercial program that can communicate with the device, and a
serial port sniffer, and so I am able to get any number of sample
checksum digits. Below is a list of some.

I keep finding patterns, and it seems to revolve around the magic
number of 7.

If anyone could please help find this out, or does anyone know of a
brute-force method of determining a checksum?

Thanks,
Ryan Johnson.



1255 | 4
1265 | 7
1256 | 7
1355 | 5
3455 | 0
2455 | 1
1455 | 2
455 | 3
3355 | 7
2355 | 6
1355 | 5
355 | 4
255 | 5
1255 | 4
2255 | 7
3255 | 6
4255 | 1
425 | 4
1 | 6
2 | 5
3 | 4
4 | 3
5 | 2
6 | 1
7 | 0
8 | ?
9 | >
10 | 6
11 | 7
12 | 4
13 | 5
14 | 2
15 | 3
16 | 0
17 | 1
18 | >
19 | ?
21 | 4
23 | 6
2 | 5
22 | 7
222 | 5
3333 | 7

3 | 4
33 | 7
333 | 4
3333 | 7

123456789123456789 | 9

45 | 6
56 | 4
3567 | 0
3566 | 1
356 | 7
1234 | 3
123 | 7


Newby question isn't a checksum of one digit inadequate for a serial
transmission?

It would be like dividing 474656229 by 15108777 and validating on a
single MSD wouldn't it?
 
J

Joe Wright

anonymous said:
Newby question isn't a checksum of one digit inadequate for a serial
transmission?

It would be like dividing 474656229 by 15108777 and validating on a
single MSD wouldn't it?
 
J

Joe Wright

anonymous said:
Newby question isn't a checksum of one digit inadequate for a serial
transmission?

It would be like dividing 474656229 by 15108777 and validating on a
single MSD wouldn't it?
 
M

Marty

? and > can be control characters in some systems, and indicate it is not
simple checksum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top