473,499 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checksum method determination

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

Feb 3 '06 #1
15 3842
rj********@hotmail.com writes:
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 3 '06 #2
In message <11**********************@g43g2000cwa.googlegroups .com>,
rj********@hotmail.com writes
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???

--
Jeremy Boden
Feb 3 '06 #3
<rj********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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.

--
LTP

:)
Feb 3 '06 #4
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

Feb 3 '06 #5
rj********@hotmail.com wrote:
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.

--
Ian Collins.
Feb 3 '06 #6
rj********@hotmail.com wrote:
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.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Feb 3 '06 #7
Thank you,

The answer was to do with parity

temp XOR temp+1 where temp is the number

Feb 3 '06 #8
On 2 Feb 2006 16:00:40 -0800, rj********@hotmail.com wrote:
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
Feb 3 '06 #9
rj********@hotmail.com wrote:
Thank you,

The answer was to do with parity

temp XOR temp+1 where temp is the number

Please read http://cfaj.freeshell.org/google/
Thank you!
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Feb 3 '06 #10

<rj********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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....
Feb 3 '06 #11
In <11**********************@g43g2000cwa.googlegroups .com>, on
02/02/2006
at 04:00 PM, rj********@hotmail.com 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 sp******@library.lspace.org

Feb 3 '06 #12
On 2 Feb 2006 16:00:40 -0800, rj********@hotmail.com wrote:
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?
Feb 4 '06 #13
anonymous wrote:
On 2 Feb 2006 16:00:40 -0800, rj********@hotmail.com wrote:

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?

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Feb 4 '06 #14
anonymous wrote:
On 2 Feb 2006 16:00:40 -0800, rj********@hotmail.com wrote:

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?

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Feb 4 '06 #15

"anonymous" <no****@nospam.org> wrote in message
news:jr********************************@4ax.com...
On 2 Feb 2006 16:00:40 -0800, rj********@hotmail.com wrote:
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 | >


? and > can be control characters in some systems, and indicate it is not
simple checksum
Feb 4 '06 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1583
by: GujuBoy | last post by:
i have the following code...which works fine in UNIX but then i move it over to WINDOWS XP and check the sum on the same file that i tested on unix and i get different results. def...
2
5249
by: pradeep | last post by:
I have 2 data files, DATA1 and DATA2 , both same. My task is to: Open DATA1, compute the checksum and put it in the end of the file(don't bother about boundary conditions).close DATA1 Open...
2
4863
by: Abby | last post by:
I need to do 8 bits 2's complement checksum, so I wrote code in order to see if the checksum calculation is correct. ===========================================================================...
6
4296
by: Kevin | last post by:
I'm on Sun 0S 5.8 and need to calculate the checksum of certain sections in an ELF binary file. Specifically .text to .rodata. I'm able to parse through to the program header table and then find...
6
4660
by: Astroman | last post by:
Hi guys and girls. This is my first time posting here so go easy :) . I was wondering if someone could please interpret how this csum() function works in the following C code. I know that the...
3
6527
by: Andrus | last post by:
Device connected to serial port accepts data packets in the form 02 0x57 ll ll 00 00 00 00 dd..dd cc cc 02 (1 byte ) is message prefix 0x57 (1 byte) is message type (W=Write) ll ll ( 2 bytes)...
0
1012
by: Kenneth Allen | last post by:
I am attempting to port some code from an old C program into C#, and I have run into a roadblock with generating a checksum for each of the structures, and where the checksum is the last field in...
4
15902
by: wg | last post by:
I am looking for code for VB.NET or C# for a CCITTA CRC Checksum using the table lookup method for speed.. I have found a few CRC-16 examples but they are in a language I cant seem to figure out....
4
12645
by: Rain | last post by:
hi, need help here, does anyone know how to use or does any one have the code for checksum? I want to checksum a string to be sent using udp and checksum it again when received.. does anyone...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.