Pages: [1]
Author Topic: M3.x M5.x firmware checksum  (Read 2205 times)
ecuprog7
Full Member
***

Karma: +10/-8
Online Online

Posts: 84


« on: May 04, 2026, 04:16:10 AM »

Hi,
 im working on the checksums for this old ecu´s. I think i got the first one:
Code:
def SummInt8(StartInt8, EndInt8, SearchBuffer, startValue):

    summ = startValue
    i = StartInt8
    while i <= EndInt8 :
        summ = (summ + SearchBuffer[i]) & 0xFFFF;
        i += 1

    return summ;

if( (str(inData).find("M5.4") != -1):
            check1Init = 0
            print("found M5.4")
       
        elif(str(inData).find("M3.8") != -1) | (str(inData).find("M5.9") != -1):
            check1Init = 0x4000
            print("found M3.8 / M5.9")

        else:
            print("found no M3.x / M5.x string in data -> error")
            return 0;
       
        partSum = SummInt8(0x200, 0x3FF, inData, check1Init);
        partSum = SummInt8(0x500, 0x1AFF, inData, partSum);
        partSum = SummInt8(0x1C00, 0x1EFF, inData, partSum);
        partSum = SummInt8(0x2020, 0xBEFF, inData, partSum);
        partSum = SummInt8(0xC000, len(inData)-1, inData, partSum);

FileChks11 = inData[0xBF01] + (inData[0xBF00] << 8)

print(" calc Code chk1: ", hex(partSum), FileChks11  == partSum )

Small amounts of the code are not checked an i don´t know where the init value of 0x4000 in M3.8/ M5.9 comes from but its a start.
Does anyone know how the values on Addresses 0xBF02+0xBF03 and 0xBF04+0xBF05 are calculated?
Thanks in advance Prog7
Logged
marantzvieta
Full Member
***

Karma: +3/-5
Offline Offline

Posts: 95


« Reply #1 on: July 08, 2026, 03:55:31 AM »

Hi, check your PMs.

Regards
Logged
nyet
Administrator
Hero Member
*****

Karma: +614/-172
Offline Offline

Posts: 12366


WWW
« Reply #2 on: July 08, 2026, 04:54:00 PM »

Please make the information public. Don't hide behind pms.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.061 seconds with 15 queries. (Pretty URLs adds 0.001s, 0q)