GM BCM programming how to calcualte checksums?

American Delco GM ECUs and PCMs, ALDL, OBD 1.5.
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

GM BCM programming how to calcualte checksums?

Post by 04colyZQ8 »

I can segment swap certain GM BCMs. I have a educated guess as to certain booleens are for, trouble is I can't figure out how to calculate the checksum (CVN) I've tried flashing without updated checksums and it bricks at 98%, but then is recoverable with GM SPS. The bins I have to don't show the CVns from GMs website? So I don't know they are calculating the checksums? It's likely some kind of CRC-16?

Here is a 2006 hummer H3 BCM stock lighting segment bin file. F2 E8 FA = the segment part number (15919354) Gm says the CVN is 0000E920 but I can't find that in the code, and I cannot calculate that value using 8, 16, CRC, so what gives? I'd guess the 08 D8 to be the checksum location (first 2 bytes) but I also can't figure out how that's calculated.

08 D8 00 03 00 F2 E8 FA 41 45 00 00 00 09 00 E0 04 02 46 AF 0D 00 00 68 90 00 00 44 14 00 00 18 04 11 00 00 00 00 00 00 01 FF F8 01 80 63 86 00 30 90 14 08 14 8D B8 00 C9 C0 A0 18 1A 01 0D 01 00 FF FF 00 19 FF FF 00 4C D1 D1 00 7F A3 A3 00 B2 75 75 00 E5 47 47 00 FF 47 47 00 3A 00 2F 00 00 59 A6 08 10 4D 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: GM BCM programming how to calcualte checksums?

Post by antus »

Ive had a bit of a play, but came up empty. Do you have any ability to edit this file correctly and dump it again? Would be interesting to change one thing, preferably a single flag, and then dump it again. Should be able to zero in on what else changes that way. If the CVN isnt here, its also possible the sum isnt. Would also be beneficial to know what the sum is, better if we can see it in the file. Ive attached the file as a bin incase anyone wants to play with it in that format.
Attachments
bcmdata.bin
(320 Bytes) Downloaded 738 times
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
typeigor
Posts: 3
Joined: Mon Nov 25, 2013 7:01 pm

Re: GM BCM programming how to calcualte checksums?

Post by typeigor »

The checksum is stored in the first two bytes.
can be counted.
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: GM BCM programming how to calcualte checksums?

Post by 04colyZQ8 »

How did you count it?
typeigor
Posts: 3
Joined: Mon Nov 25, 2013 7:01 pm

Re: GM BCM programming how to calcualte checksums?

Post by typeigor »

To calculate the checksums I use TunerCats,VDFEditor.
I insert the BCM file instead of the last firmware module for TunerCats.
In VdfEditor, I adjust the length of the last module in accordance with the length of the BCM module.
I open it in TunerCats and that's it ... checksums is counted ...
ironduke
Posts: 579
Joined: Thu Feb 13, 2020 11:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: GM BCM programming how to calcualte checksums?

Post by ironduke »

Way late to the party but I just started looking at BCMs.. this might help out someone..

load the file into a hex editor, highlight everything but the first 2 bytes(08 D8) and then get your checksums for the selection..
Find the sum of the Big-Endian 16-bit values and get the last 2 bytes.. (f728)

checksum = ~f728 + 1 This would give you the 08D8 that's right at the start of the file..
Cuongcoco
Posts: 23
Joined: Sun Jan 03, 2021 5:52 pm

Re: GM BCM programming how to calcualte checksums?

Post by Cuongcoco »

ironduke wrote:Way late to the party but I just started looking at BCMs.. this might help out someone..

load the file into a hex editor, highlight everything but the first 2 bytes(08 D8) and then get your checksums for the selection..
Find the sum of the Big-Endian 16-bit values and get the last 2 bytes.. (f728)

checksum = ~f728 + 1 This would give you the 08D8 that's right at the start of the file..

hi,
can you help me find out algorithm checksum of this file?
ff ff ff ff 00 00 00 00 00 00 00 79 0d 1f 2c a1
08 20 01 80 6b 28 41 42 ff ff 43 00 08 32 35 31
39 33 32 35 36 48 00 1d e2 00 04 b0 05 10 05 01
01 05 01 0f 05 0b 0d 0a 06 03 00 02 08 01 04 0c
0e 07 09 20 55 43 00 01 aa 43 00 01 33 43 00 01
cc 43 00 01 ee 43 00 01 11 43 00 01 f0 43 00 01
0f 43 00 12 10 00 0c 50 01 00 11 07 03 0c 4e 01
02 04 4c 1e c8 14 ff ff ff ff ff bf ff ff 54 ff
04 aa 55 ff ff
i realize 01 80 6b 28 is file name. and i compare it with same function another file . it difference 3 point : 79 1f 2c ( except file name). can you realize algorithm of this file ? thank you very much
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: GM BCM programming how to calcualte checksums?

Post by 04colyZQ8 »

ironduke wrote:Way late to the party but I just started looking at BCMs.. this might help out someone..

load the file into a hex editor, highlight everything but the first 2 bytes(08 D8) and then get your checksums for the selection..
Find the sum of the Big-Endian 16-bit values and get the last 2 bytes.. (f728)

checksum = ~f728 + 1 This would give you the 08D8 that's right at the start of the file..
I am unable to get f728 what hex editor should I use? I have Hxd. I don’t see any option for big Indian check sum 16. I highlighted everything but the two bytes. And choose every type of 16 bit checksum I could find and never came up with f728? Every time I tried a 16 style checksum only only got 2 bytes. But you say take the last two bytes? So do you mean to use a 32 bit check sum that outputs 4 bytes? Example ffff bbbb and then take the bbbb and add 1?

Also I’m not sure how adding 1 to f728 becomes 08D8? How is this math done? Wouldn’t it be f729?

Thanks Jamie
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: GM BCM programming how to calcualte checksums?

Post by 04colyZQ8 »

typeigor wrote:To calculate the checksums I use TunerCats,VDFEditor.
I insert the BCM file instead of the last firmware module for TunerCats.
In VdfEditor, I adjust the length of the last module in accordance with the length of the BCM module.
I open it in TunerCats and that's it ... checksums is counted ...

Can you help me? I have cats and vdf editor not sure how you mean to calculate the the checksums using the last firmware module uploaded? I don’t see anything called firmware in tuner cats vdf editor folder- Thanks Jamie
ironduke
Posts: 579
Joined: Thu Feb 13, 2020 11:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: GM BCM programming how to calcualte checksums?

Post by ironduke »

04colyZQ8 wrote:
ironduke wrote:Way late to the party but I just started looking at BCMs.. this might help out someone..

load the file into a hex editor, highlight everything but the first 2 bytes(08 D8) and then get your checksums for the selection..
Find the sum of the Big-Endian 16-bit values and get the last 2 bytes.. (f728)

checksum = ~f728 + 1 This would give you the 08D8 that's right at the start of the file..
I am unable to get f728 what hex editor should I use? I have Hxd. I don’t see any option for big Indian check sum 16. I highlighted everything but the two bytes. And choose every type of 16 bit checksum I could find and never came up with f728? Every time I tried a 16 style checksum only only got 2 bytes. But you say take the last two bytes? So do you mean to use a 32 bit check sum that outputs 4 bytes? Example ffff bbbb and then take the bbbb and add 1?

Also I’m not sure how adding 1 to f728 becomes 08D8? How is this math done? Wouldn’t it be f729?

Thanks Jamie
I've been using Hex editor Neo but I know others have a checksum feature as well.. I never figured out the CVN the original poster was looking for so I don't think I have all the asnwers, but..

If I hightlight every byte except for the first 2 (08D8) and perform checksums against the selected data the sum of the Big-endian 16 bit values is shows as 0xff728..
Now I use the last 4 or 0xF728 or 1111 0111 0010 1000 in binary..
the little ~ that I used before is the bitwise NOT symbol which is the equivelent of ones compliment.. you flip all the 1's and zeros.. ~0000111 is 11110000 ... got it??
2's compliment is basically flipping all the 1's to zeros and the zeros to 1's.. and then adding 1 to it.. I don't know why or how or anything else other than the result, lol..
so 1111 0111 0010 1000 using the ~ or NOT function becomes 0000 1000 1101 0111 or 0x08d7... Now we need to add 1 to get 0000 1000 1101 1000 or 0x8d8..


if you use your hex editor and select everything but the first 2 bytes and perform the checksum routines what are you getting for results?
Post Reply