473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to determine checksum calculation method

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) are message data length
00 00 00 00 (4 bytes) seems to be constant zero bytes
dd..dd ( ll ll bytes) is message content which I can vary.
cc cc ( 2 bytes ) is problebly message checksum

I need to determine method which is used for checksum calculation.
Application which generates those packets is in 50 KB .exe file form, no
source code.
It must be some simple method.

I can genereate data packets and listen them to observe created checksums.
I experimented with 1 byte data packets and got the following results.

Any idea which method is used for checksum calculation ?

Observed checksum is in the last two bytes.

57 00 01 00 00 00 00 00 89 EF
57 00 01 00 00 00 00 01 09 EA
57 00 01 00 00 00 00 02 09 E0
57 00 01 00 00 00 00 03 89 E5
57 00 01 00 00 00 00 04 09 F4
57 00 01 00 00 00 00 05 89 F1
57 00 01 00 00 00 00 06 89 FB
57 00 01 00 00 00 00 07 09 FE
57 00 01 00 00 00 00 08 09 DC
57 00 01 00 00 00 00 09 89 D9
57 00 01 00 00 00 00 0A 89 D3
57 00 01 00 00 00 00 0B 09 D6
57 00 01 00 00 00 00 0C 89 C7
57 00 01 00 00 00 00 0D 09 C2
57 00 01 00 00 00 00 0E 09 C8
57 00 01 00 00 00 00 0F 89 CD
57 00 01 00 00 00 00 10 09 8C
57 00 01 00 00 00 00 11 89 89
57 00 01 00 00 00 00 12 89 83
57 00 01 00 00 00 00 13 09 86
57 00 01 00 00 00 00 14 89 97
57 00 01 00 00 00 00 15 09 92
57 00 01 00 00 00 00 16 09 98
57 00 01 00 00 00 00 17 89 9D
57 00 01 00 00 00 00 18 89 BF
57 00 01 00 00 00 00 19 09 BA
57 00 01 00 00 00 00 1A 09 B0
57 00 01 00 00 00 00 1B 89 B5
57 00 01 00 00 00 00 1C 09 A4
57 00 01 00 00 00 00 1D 89 A1
57 00 01 00 00 00 00 1E 89 AB
57 00 01 00 00 00 00 1F 09 AE
57 00 01 00 00 00 00 20 09 2C
57 00 01 00 00 00 00 21 89 29
57 00 01 00 00 00 00 22 89 23
57 00 01 00 00 00 00 23 09 26
57 00 01 00 00 00 00 24 89 37
57 00 01 00 00 00 00 25 09 32
57 00 01 00 00 00 00 26 09 38
.....
57 00 01 00 00 00 00 F9 8B F9
57 00 01 00 00 00 00 FA 8B F3
57 00 01 00 00 00 00 FB 0B F6
57 00 01 00 00 00 00 FC 8B E7
57 00 01 00 00 00 00 FD 0B E2
57 00 01 00 00 00 00 FE 0B E8
57 00 01 00 00 00 00 FF 8B ED

Andrus.
Nov 15 '05 #1
3 6521
Andrus wrote:
Device connected to serial port accepts data packets in the form
Standard C knows nothing about serial ports.

<snip>
I need to determine method which is used for checksum calculation.
Application which generates those packets is in 50 KB .exe file form, no
source code.


<sbip>

Standard C also knows exactly nothing about this application of yours.

Nothing else you posted has anything to do with C either. So your post
is completely off topic. And no, we don't care if the application was
written in C or if you think we could do the analysis with a C program.
There are billions of programs written in C and an infinite number that
could be written in C.

I suggest you go and ask the people who supplied the SW and if they
won't tell you I suggest you throw it away and use something else instead.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #3
Pacher R. Dragos wrote:
Maybe this will help:

http://gpsbots.com/tutorials/tut_io_class.php


Provide context, most people don't use Google and may not have seen or
have available the article you are responding to. There have already
been posts today with instructions on how to do it.

Also complain to Google for their stupid interface making you look like
an idiot.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #4

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

Similar topics

2
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
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
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...
15
by: ValK | last post by:
Hello, I’m working with handheld device that communicates with windows service thru the serial port. Transaction between device and my application looks like this: Handshaking: Device sends ...
15
by: rjfjohnson | last post by:
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...
4
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...
1
by: Imran | last post by:
Hello all I am trying to calculate a checksum correction for 16 byte checksum calculation. I have 1 lines of data xxxxxxxxyyyyyyyy80804C0400004204UUUUUUUU What I am trying to achive is...
3
by: rcamarda | last post by:
I've searched the forum for uses of CHECKSUM and havent found a satisfactory answer. I need to know when a row changes and I dont care what it was or is, I just need to know it changed. Detail:...
3
by: Adriano | last post by:
Hello. I have a situation where need to calculate a checksum of some byte array. Here's the sample output from server: 2008-09-30 11:35:00 `SC`00541.00TJ123456PPC 00000000DLGLGN...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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...
0
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...

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.