Maker Pro
Maker Pro

Help with checksums

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
Hello All!
I am pretty new to electronics, and am trying to figure out an issue. I have been capturing and decoding fsk being sent to a device (it is being received by a MT88E43B chip), and am trying to figure out the checksum format used so I can generate it. Is it some sort of two's compliment sum? Any help would be appreciated! some examples are

80 1C 01 08 31 31 31 36 31 32 34 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54

and

80 1C 01 08 31 31 31 36 31 32 33 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53

and here are some from a sequence

80 1C 01 08 31 32 30 33 31 30 31 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D

80 1C 01 08 31 32 30 33 31 30 30 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E

80 1C 01 08 31 32 30 33 31 30 30 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D

80 1C 01 08 31 32 30 33 31 30 30 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C

80 1C 01 08 31 32 30 33 31 30 30 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B

80 1C 01 08 31 32 30 33 31 30 30 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A

80 1C 01 08 31 32 30 33 31 30 30 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59

80 1C 01 08 31 32 30 33 31 30 30 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58

80 1C 01 08 31 32 30 33 31 30 30 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57

80 1C 01 08 31 32 30 33 31 30 30 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56
 
Last edited:

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
more details

I have noticed that they all seem to add up to 1280 dec, regardless of the contents.

the below one adds up to 512 regardless... I wonder is the sum related to the length of the string...

80 08 5B 01 00 6D 00 6F 01 01 3E
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I have noticed that they all seem to add up to 1280 dec, regardless of the contents.

And that might be your answer, the checksum is 1280 - Measured_Value and thus always adds up to 1280...
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
Seems so

And that might be your answer, the checksum is 1280 - Measured_Value and thus always adds up to 1280...

I think you might be right. I wonder if it has a name.
will get back with the test results...
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
no such luck...

I tried this, and it was not recognized
80 1C 01 08 31 32 32 32 30 26 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 69

but then I tried the range from 50 to 5F for the final value, and this worked.

80 1C 01 08 31 32 32 32 30 26 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59

so I guess it just rolls over...?

this new valid command adds up to 1264. the sum without the end byte is 1175 .
 
Last edited:

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
I don't think 1280 has much to do with it. The checksum adds up to an 8bit rest of 00. Since the checksum is only 1 byte you can't have a total of more than one byte.

I would think that the start value is 00, and then all header and data bytes is subtracted from that and the rest is the checksum. When you receive this, you only do a modula 8 addition of all bytes getting a rest of 00.

This is really a very simple and passable checksum protection. The second byte seems to be the number of data bytes in the record.
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
ah I see

Thanks for the response.
I think I understand everything but what you mean by "rest of 00".
so for this one, I add all the bytes together, except for the "9" then substract it from the nearest higher multiple of 8?

80 1C 01 08 31 32 32 32 30 26 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59

I am trying to write a bash script to generate these, if that helps.
 
Last edited:

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
It looks my solution was a bit premature. What is this device you are communicating with? As far as I can see the MT88E43B is just a modem.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,615
Joined
Nov 17, 2011
Messages
12,615
There are many ways to calculate a checksum. From simple parity checks to CRCs to MD5 hashes and on. Unless you know at least what type of checksum is used, it will be pretty hard to figure out the algorithm.

I think CC has made a very good guess. But it's probably not te 1280d you're after, but the rest of 00, as gorgon noted. The "rest of 00" means that you add up using only 2 bytes if the sum is higher than FF, then you cut of the digits to the left and continue using the last 2 digits.

Harald
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
It looks my solution was a bit premature. What is this device you are communicating with? As far as I can see the MT88E43B is just a modem.

its a device for emergency broadcasts, custom made.
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
So close

There are many ways to calculate a checksum. From simple parity checks to CRCs to MD5 hashes and on. Unless you know at least what type of checksum is used, it will be pretty hard to figure out the algorithm.

I think CC has made a very good guess. But it's probably not te 1280d you're after, but the rest of 00, as gorgon noted. The "rest of 00" means that you add up using only 2 bytes if the sum is higher than FF, then you cut of the digits to the left and continue using the last 2 digits.

Harald
Yes, thanks
I think the first hex digit is the number of bytes less the first, mod16
I think the last hex digit is 16 minus the sum of the strings mod 16 value.
But unfortunately it does not always work!
its maddening, because it works for many of the possible values, but not others
am I calculating it incorrectly?


the way I was calculating it was like this

sum=$((794+$mt1+$mt2+$d1+$d2+$h1+$h2+$m1+$m2))
mod=$((sum % 16))
c=$((16-$mod))
with the value like this.
FFFFFFFFFFFFFFFF801C0108$(($mt1-18))$(($mt2-18))$(($d1-18))$(($d2-18))$(($h1-18))$(($h2-18))$(($m1-18))$(($m2-18))6D0070005B010063052000000003490233335$check


I basically converted the strings hex values into decimal values, and summed them, then took the mod 16 of the sum, then subrtracted from 16 to get the value.

I wrote this program to generate checksums

Code:
#!/bin/bash

#binfile="$1"

thisdir=`pwd`
thisdatetime=`date +%m%d%H%M`

# xxd -p binfile -> hex.output.file                     produces hex.output
# cat hex.output.file | xxd -r -p > testbin.2           takes hex.output and builds binfile

echo "
Creating modHexFiles$thisdatetime directory for hex mofidied files

Creating modBinFiles$thisdatetime directory for bin mofidied files

Creating modSndFiles$thisdatetime directory for wav mofidied files
"
mkdir $thisdir/modHexFiles$thisdatetime
mkdir $thisdir/modBinFiles$thisdatetime
mkdir $thisdir/modSndFiles$thisdatetime
mkdir $thisdir/modSlnFiles$thisdatetime


#cd $thisdir/modHexFiles$thisdatetime


#/usr/bin/xxd -p $thisdir/$binfile > $thisdir/modHexFiles$thisdatetime/binfile.hex

##get header lines
#head -n -1 $thisdir/modHexFiles$thisdatetime/binfile.hex > $thisdir/modHexFiles$thisdatetime/binfile.headers.hex

##get last line
#tail -n -1 $thisdir/modHexFiles$thisdatetime/binfile.hex > $thisdir/modHexFiles$thisdatetime/binfile.last.hex

##get last line without the last 2 characters
#lastLine=`cat $thisdir/modHexFiles$thisdatetime/binfile.last.hex | sed 's/..$//'`
#30      31      32      33      34      35      36      37      38      39
#0       1       2       3       4       5       6       7       8       9
#48      49      50      51      52      53      54      55      56      57


##iterate  8 time digits
##position n-1
 #                        h1=48
#                         h2=48
#                         m1=48
#                         m2=48
                                    



for mt1 in {49..49}
do
for mt2 in {50..50}
do
for d1 in {48..48}
do
for d2 in {56..56}
do
for h1 in {50..50}
do
for h2 in {48..57}
do
for m1 in {48..53}
do
for m2 in {48..57}
do

                        #firstNum=`printf "%x" 5`
                        #secondNum=`printf "%x" $c`

                         #mt1=49 #month1 
                         #mt2=50 #month2
                         #d1=48
                         #d2=54
                         #h1=50
                         #h2=52
                         #m1=52
                         #m2=55 
                        sum=$((794+$mt1+$mt2+$d1+$d2+$h1+$h2+$m1+$m2))
                        mod=$((sum % 16))
                        c=$((16-$mod))
                        check=`printf "%X\n" $(($c))`
                        #date=1203
                        clock=($(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))$(($h1-48))$(($h2-48))$(($m1-48))$(($m2-48)))
                        
                      #  if [$(($mt1-48)) == 1] && [$(($mt2-50)) > 2 || [ -e "/root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/$clock.sln" ]
if [ "$mt1" == "48" ] && [ "$mt2" == "48" ]
        then
                        echo $clock
                        echo month 00 not valid
                else

if [ "$mt1" == "49" ] && [ "$mt2" \> "50" ]                
                        then 
                        echo $clock
                        echo month above 12 not valid
else

                        ##create hex file with date
echo FFFFFFFFFFFFFFFF801C0108$(($mt1-18))$(($mt2-18))$(($d1-18))$(($d2-18))$(($h1-18))$(($h2-18))$(($m1-18))$(($m2-18))6D0070005B010063052000000003490233335$check> $thisdir/modHexFiles$thisdatetime/$clock.pre
cat $thisdir/modHexFiles$thisdatetime/$clock.pre |xxd -r -p > $thisdir/modBinFiles$thisdatetime/$clock.bin
                        
                        echo $(($sum+$c))
                        echo $clock
                        echo $sum sum
                        echo $mod mod
                        echo $c val                                                
                        echo $check hex check

                        ##create mod hex file
                        #cat $thisdir/modHexFiles/$thisdatetime.bin > $thisdir/modHexFiles$thisdatetime/binfile.$q.hex
                        #echo "$firstNum$secondNum" >> $thisdir/modHexFiles$thisdatetime/binfile.$q.hex
                        ##create mod bin file
                       # cat $thisdir/modHexFiles$thisdatetime/binfile.$q.hex | xxd -r -p > $thisdir/modBinFiles$thisdatetime/binfile.$q.bin
                                                ##create sound file with minimodem
cat $thisdir/modBinFiles$thisdatetime/$clock.bin | minimodem --tx 1200 -f $thisdir/modSndFiles$thisdatetime/$clock.wav

                                                ##transcode to sln with sox
                                                # sox $thisdir/modSndFiles$thisdatetime/$clock.wav -t raw -r 8000 -s -c 1 $thisdir/modSlnFiles$thisdatetime/$clock.sln

mkdir /root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/
sox /root/date/modSndFiles$thisdatetime/$clock.wav -t raw -r 8000 -s -c 1 /root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/$clock.sln                                                                        
 #rm $thisdir/modHexFiles$thisdatetime/$clock.pre
 #rm $thisdir/modBinFiles$thisdatetime/$clock.bin
 #rm $thisdir/modSndFiles$thisdatetime/$clock.wav
fi                    
fi
done
done
done
done
done
done
done
done
#rm -r $thisdir/modHexFiles$thisdatetime/
#rm -r $thisdir/modBinFiles$thisdatetime/
#rm -r $thisdir/modSndFiles$thisdatetime/
echo "
Removing temporary files
"
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
so this value works.
it displays 12082035
FFFFFFFFFFFFFFFF801C010831323038323033356D0070005B0100630520000000034902333351

but this one does not
FFFFFFFFFFFFFFFF801C010831323038323033366D0070005B01006305200000000349023333510
it should display 120836

wait its giving 10... this is wrong...
 
Last edited:

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
Hey Maybe this is gonna work

I think I got it! I just added a check that sets the check to 0 whenever the mod16 of the sum = 0, and its working so far!
here is the codes
Code:
#!/bin/bash

thisdir=`pwd`
thisdatetime=`date +%m%d%H%M`

echo "
Creating modHexFiles$thisdatetime directory for hex mofidied files

Creating modBinFiles$thisdatetime directory for bin mofidied files

Creating modSndFiles$thisdatetime directory for wav mofidied files
"
mkdir $thisdir/modHexFiles$thisdatetime
mkdir $thisdir/modBinFiles$thisdatetime
mkdir $thisdir/modSndFiles$thisdatetime
mkdir $thisdir/modSlnFiles$thisdatetime


##get last line without the last 2 characters
#lastLine=`cat $thisdir/modHexFiles$thisdatetime/binfile.last.hex | sed 's/..$//'`
#30      31      32      33      34      35      36      37      38      39
#0       1       2       3       4       5       6       7       8       9
#48      49      50      51      52      53      54      55      56      57


for mt1 in {49..49}
do
for mt2 in {50..50}
do
for d1 in {48..48}
do
for d2 in {56..56}
do
for h1 in {50..50}
do
for h2 in {48..57}
do
for m1 in {48..53}
do
for m2 in {48..57}
do

                        sum=$((794+$mt1+$mt2+$d1+$d2+$h1+$h2+$m1+$m2))
                        mod=$((sum % 16))
                        c=$((16-$mod))
if [ "$mod" == "0" ]
then                        
    check=`printf "%X\n" $((0))`
else
                        check=`printf "%X\n" $(($c))`
fi    
                        #date=1203
                        clock=($(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))$(($h1-48))$(($h2-48))$(($m1-48))$(($m2-48)))
                        
                      #  if [$(($mt1-48)) == 1] && [$(($mt2-50)) > 2 || [ -e "/root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/$clock.sln" ]
if [ "$mt1" == "48" ] && [ "$mt2" == "48" ]
        then
                        echo $clock
                        echo month 00 not valid
                else

if [ "$mt1" == "49" ] && [ "$mt2" \> "50" ]                
                        then 
                        echo $clock
                        echo month above 12 not valid
else

                        ##create hex file with date
echo FFFFFFFFFFFFFFFF801C0108$(($mt1-18))$(($mt2-18))$(($d1-18))$(($d2-18))$(($h1-18))$(($h2-18))$(($m1-18))$(($m2-18))6D0070005B010063052000000003490233335$check> $thisdir/modHexFiles$thisdatetime/$clock.pre
cat $thisdir/modHexFiles$thisdatetime/$clock.pre |xxd -r -p > $thisdir/modBinFiles$thisdatetime/$clock.bin
                        
                        echo $(($sum+$c))
                        echo $clock
                        echo $sum sum
                        echo $mod mod
                        echo $c val                                                
                        echo $check hex check

                                                ##create sound file with minimodem
cat $thisdir/modBinFiles$thisdatetime/$clock.bin | minimodem --tx 1200 -f $thisdir/modSndFiles$thisdatetime/$clock.wav

                                                ##transcode to sln with sox
                                                # sox $thisdir/modSndFiles$thisdatetime/$clock.wav -t raw -r 8000 -s -c 1 $thisdir/modSlnFiles$thisdatetime/$clock.sln

mkdir /root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/
sox /root/date/modSndFiles$thisdatetime/$clock.wav -t raw -r 8000 -s -c 1 /root/date/modSlnFiles$thisdatetime/$(($mt1-48))$(($mt2-48))$(($d1-48))$(($d2-48))/$clock.sln                                                                        
 #rm $thisdir/modHexFiles$thisdatetime/$clock.pre
 #rm $thisdir/modBinFiles$thisdatetime/$clock.bin
 #rm $thisdir/modSndFiles$thisdatetime/$clock.wav
fi                    
fi
done
done
done
done
done
done
done
done
#rm -r $thisdir/modHexFiles$thisdatetime/
#rm -r $thisdir/modBinFiles$thisdatetime/
#rm -r $thisdir/modSndFiles$thisdatetime/
echo "
Removing temporary files
"
 
Last edited:

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
protocol

Yes, we know its fsk, and we found out by testing its Bell202 1200 bps. also, in the original, there are no FF in the beginning, but when you look at the waveform, you see a 1200 hz sine wave before the message starts, and it does not work without it, so I added it with FF, or zeros, which do the same thing.
 
Last edited:

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
more data

so after that fix, many more times work, but there are still some that do not. here is a table, the ones that do not work are marked "bad" the rest I tested and work. the first number is the time it displays, then there is the hex string, then there is the sum without the last 2 bytes and then there is the sum with the check sum byte added( I did not add the second to last byte to the sum)


12100900 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12100901 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12100902 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12100903 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12100904 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12100905 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100906 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100907 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100908 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100909 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 30 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100910 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12100911 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12100912 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12100913 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12100914 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100915 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100916 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100917 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100918 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100919 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 31 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1201 1216 F bad
12100920 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12100921 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12100922 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12100923 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100924 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100925 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100926 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100927 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100928 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1201 1216 F bad
12100929 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 32 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1202 1216 E bad
12100930 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12100931 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12100932 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100933 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100934 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100935 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100936 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100937 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1201 1216 F bad
12100938 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1202 1216 E bad
12100939 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 33 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1203 1216 D bad
12100940 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12100941 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100942 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100943 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100944 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100945 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100946 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1201 1216 F bad
12100947 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1202 1216 E bad
12100948 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1203 1216 D bad
12100949 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 34 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1204 1216 C bad
12100950 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12100951 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
12100952 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 52 1198 1200 2
12100953 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1199 1200 1
0000000000000zero mod value000000000000
12100954 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1200 1216 0
12100955 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1201 1216 F bad
12100956 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1202 1216 E bad
12100957 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1203 1216 D bad
12100958 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1204 1216 C bad
12100959 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 30 39 35 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1205 1216 B bad
12101000 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 51 1183 1184 1 bad
0000000000000zero mod value000000000000
12101001 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1184 1200 0 bad
12101002 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1185 1200 F
12101003 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1186 1200 E
12101004 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1187 1200 D
12101005 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101006 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101007 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101008 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101009 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 30 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
0000000000000zero mod value000000000000
12101010 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1184 1200 0 bad
12101011 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1185 1200 F bad
12101012 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1186 1200 E
12101013 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1187 1200 D
12101014 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101015 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101016 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101017 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101018 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12101019 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 31 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12101020 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5F 1185 1200 F
12101021 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1186 1200 E
12101022 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1187 1200 D
12101023 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101024 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101025 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101026 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101027 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12101028 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12101029 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 32 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12101030 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5E 1186 1200 E
12101031 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1187 1200 D
12101032 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101033 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101034 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101035 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101036 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12101037 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12101038 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12101039 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 33 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12101040 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5D 1187 1200 D
12101041 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101042 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101043 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101044 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101045 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12101046 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12101047 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12101048 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12101049 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 34 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12101050 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5C 1188 1200 C
12101051 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 31 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5B 1189 1200 B
12101052 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 32 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 5A 1190 1200 A
12101053 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 33 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 59 1191 1200 9
12101054 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 34 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 58 1192 1200 8
12101055 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 35 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 57 1193 1200 7
12101056 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 36 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 56 1194 1200 6
12101057 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 37 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 55 1195 1200 5
12101058 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 38 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 54 1196 1200 4
12101059 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 30 35 39 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 53 1197 1200 3
0000000000000zero mod value000000000000
12101100 FF FF FF FF FF FF FF FF 80 1C 01 08 31 32 31 30 31 31 30 30 6D 00 70 00 5B 01 00 63 05 20 00 00 00 03 49 02 33 33 50 1184 1200 0 bad
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
I've read here that bell 202 uses something called "CRC-CCITT polynomial," I am looking this up, I don't know how to generate it or if it even applies to this device really. As always, any help is appreciated.
http://n1vg.net/packet/index.php
 
Last edited:

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
I also found this

CHECKSUM WORD The Checksum Word contains the twos complement of the modulo 256 sum of the other words in the data message (i.e., message type, message length, and data words). The receiving equipment may calculate the modulo 256 sum of the received words and add this sum to the reveived checksum word. A result of zero generally indicates that the message was correctly received. Message retransmission is not supported.

Read more at: http://www.epanorama.net/documents/telecom/cid_bellcore.html
 

iondream

Dec 2, 2012
15
Joined
Dec 2, 2012
Messages
15
GOT IT!

I finally got it! It looks like my formula was correct, but it was mod256 instead of 16 like I assumed.

so 256 - mod(sum of string,256) in hex, works every time!

I think this is whats meant by "twos complement of the modulo 256" but I am not really sure.

Thanks again for all your help, I could not have done it without you!

-Dennis
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
I've read here that bell 202 uses something called "CRC-CCITT polynomial," I am looking this up, I don't know how to generate it or if it even applies to this device really. As always, any help is appreciated.
http://n1vg.net/packet/index.php

Since you've got the problem fixed, I suppose this is more of academic interrest to you.

CRC-CCITT is a 16 bit polynomial checksum. In nature it is serial and the data is shifted into this with feedbacks from certain bits in the polynomial. If you have enough memory, the easiest way to generate this is via a lookup table, 256 x 16bit values long. The table is generated with the polynomial as base, solving each value possible in a databyte. The algorithm itself is simple and fast using the lookup table.

The result from this processing of each databyte in the telegram is always a 16bit value checksum.
 
Top