Pages: 1 ... 4 5 [6] 7 8 9
Author Topic: MED 17 , EDC 17 EEPROM CHECKSUM  (Read 103638 times)
reproteq
Newbie
*

Karma: +0/-2
Offline Offline

Posts: 8


« Reply #75 on: February 13, 2022, 11:29:48 AM »

i am using this algo

https://pastebin.com/bb6E6iX7
Logged
reproteq
Newbie
*

Karma: +0/-2
Offline Offline

Posts: 8


« Reply #76 on: February 13, 2022, 11:40:10 AM »

https://ibb.co/5npwGGr

also i think in finish this soft i maked , but now not functions and not algos for finish this project if anyone want colaborate.
thanks friends
Logged
reproteq
Newbie
*

Karma: +0/-2
Offline Offline

Posts: 8


« Reply #77 on: February 13, 2022, 11:53:35 AM »

I am making these softwares, if someone wants to collaborate, a little help would not hurt

ecudecoder for vag
https://ibb.co/5npwGGr
Click image for larger version.

Name:   ecudecriptor-reproteq..jpg
Views:   0
Size:   8.3 KB
ID:   868190

percent built so far 20%



medc17 cks calc and immooff
https://ibb.co/r6MxVBy
Click image for larger version.

Name:   ckscalculator.jpg
Views:   0
Size:   9.2 KB
ID:   868191

percent built so far 98%
Logged
sandor1987
Jr. Member
**

Karma: +5/-4
Offline Offline

Posts: 46


« Reply #78 on: March 20, 2022, 01:37:51 PM »

I am making these softwares, if someone wants to collaborate, a little help would not hurt

ecudecoder for vag
https://ibb.co/5npwGGr
Click image for larger version.

Name:   ecudecriptor-reproteq..jpg
Views:   0
Size:   8.3 KB
ID:   868190

percent built so far 20%



medc17 cks calc and immooff
https://ibb.co/r6MxVBy
Click image for larger version.

Name:   ckscalculator.jpg
Views:   0
Size:   9.2 KB
ID:   868191

percent built so far 98%

looks really great!!!
Logged
prj
Hero Member
*****

Karma: +1072/-481
Offline Offline

Posts: 6037


« Reply #79 on: March 21, 2022, 07:05:09 AM »

Collaboration is done on github, not posting screenshots of random UI things.
This is not the place on the forum to sell your shit. There's a "For Sale" subsection.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
stranger
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 9


« Reply #80 on: June 09, 2022, 03:00:47 AM »

Hi. I'am trying calculate CS1 but get wrong CS each time. Maybe someone will tell me what I'm doing wrong.

Example block (from previous posts) :

36 00 F2 78 E2 09 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 6F 79 00 00 B1 6F 00 00 85 7C 88 7C

Original C code:
Code:
unsigned long crc_buffer(unsigned long crc, const unsigned long *p, unsigned long sz)
{
   const unsigned long poly = 0xEDB88320;
   unsigned long tmp1, tmp2;

   while(sz--)
   {
      tmp1 = 0;
      tmp2 = crc & poly;
      for(int i = 0; i <=31; i++ )
      tmp1 ^= ((tmp2 >> i) & 1);
      crc = *p++ ^ ((crc << 1) | tmp1) ;
   }
   return crc;
}

Pascal code from Auto-elect (post 70). He claiming that function works. As I can see this Pascal code is identical to C code except for one difference: in While loop i C we counting from last element to first, in pascal - from first to last.
Code:
function CRC32T(Initial: LongWord; Data:array of byte; DataSize: LongWord): LongWord;
const poly=$EDB88320;
var j:integer;
tmp1,tmp2,crc,i:longword;
BEGIN
crc:=initial;
i:=0;
while i<=DataSize-1 do begin
tmp1:=0;
tmp2:=crc and poly;
for j:=0 to 31 do tmp1:=tmp1 xor ((tmp2 shr j) and 1);
crc:=Data[i] xor ((crc shl 1) or tmp1);
i:=i+1;
end;
CRC32T:=crc;
END;

Question regarding input parameters: 1) Initial - understood; 2) Data -> data to checksum (byte array) - understood; 3) DataSize - ? Size of what? of byte array? In this case we don't need this parameter, we can calculate it inside function.

My code in Visual Basic:
Code:
Public Function GetCRC32_eeprom(Data As Byte(), CRC_initial As UInteger) As String

        Dim crc As UInteger = CRC_initial
        Dim poly As UInteger = &HEDB88320UI
        Dim tmp1 As UInteger
        Dim tmp2 As UInteger
        Dim size As Integer = Data.Length - 1

        While size >= 0

            tmp1 = 0
            tmp2 = crc And poly

            For i = 0 To 31
                tmp1 = tmp1 Xor ((tmp2 >> i) And 1)
            Next

            crc = Data(size) Xor ((crc << 1) Or tmp1)

            size = size - 1
        End While

        Return Hex(crc)

    End Function

With example block i can't get xx xx F2 78 checksum. Tried swap data (2bytes and 4 bytes).

Please give me hint what I am doing wrong.

Logged
SergeyIgnatov
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


« Reply #81 on: July 13, 2022, 11:52:43 AM »

everything is written in detail, read all the pages carefully
Logged
H2Deetoo
Sr. Member
****

Karma: +26/-1
Offline Offline

Posts: 257


« Reply #82 on: July 17, 2022, 12:35:13 AM »

For your example block you have these parameters for the CS16:

Initval = 0036h (first 2 bytes of the record indicating a recordid)
Data to include in this checksum starts at the 4th byte.
In the original C code this data array is handled as 32bit DWORDS so the first DWORD used in the checksum is 000009E2h.
The size of the data block to checksum is indicated in DWORDS, so in this case the size is 124 bytes, which is 31 DWORDS.

The CS16 will be 78F2h which looks just fine.


Rgs H2Deetoo
Logged
reproteq
Newbie
*

Karma: +0/-2
Offline Offline

Posts: 8


« Reply #83 on: September 02, 2022, 09:06:50 AM »

Collaboration is done on github, not posting screenshots of random UI things.
This is not the place on the forum to sell your shit. There's a "For Sale" subsection.

I don't sell ideas, I think that knowledge should be free, otherwise you wouldn't be reading this because you wouldn't even have learned to read, because someone taught you and surely you didn't pay for it.
the only thing that I think has to be sold is the work, the development of something specific for someone, as Linus Torvals said, software like sex is better for free.
here I leave you some example of what he told you, you can also visit my github and you will see how my repositories and source code is free

I have tried a thousand ways to get the crc32 cs1 cs2 manually with websites like

 crccalc.com

I would like someone to explain or help me in the  where you can see perfectly and manually how I calculate crc.
Thank you





« Last Edit: September 06, 2022, 10:47:47 PM by reproteq » Logged
Herleybob
Newbie
*

Karma: +5/-0
Offline Offline

Posts: 11


« Reply #84 on: November 19, 2022, 10:06:55 PM »

Incase anyone out there is working on a TC1762.

This only has one 16-bit checksum, its the sum of the previous 0x7E bytes.

Logged
bluelighttube
Newbie
*

Karma: +0/-1
Offline Offline

Posts: 9


« Reply #85 on: December 26, 2022, 04:24:45 PM »

Not all blocks have a valid 32 bit checksum.
So some blocks have an invalid 32 bit (cs2) checksum but a valid cs1 (with the invalid cs2). So whats the deal with these? A cs2 correction automatically requires a cs1 correction given its within the check range of cs1. Is it safe to correct these?
Logged
H2Deetoo
Sr. Member
****

Karma: +26/-1
Offline Offline

Posts: 257


« Reply #86 on: December 31, 2022, 09:18:07 AM »

I would personally not touch checksums which are invalid (in an unmodified dump)
Logged
Davidik
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 7


« Reply #87 on: January 15, 2023, 06:40:16 AM »

I read everything several times and tried many combinations. can someone tell me what I'm doing wrong Huh
Logged
H2Deetoo
Sr. Member
****

Karma: +26/-1
Offline Offline

Posts: 257


« Reply #88 on: January 15, 2023, 06:51:38 AM »

If I look at your screenshot the CRC has the last 2 bytes set to 0000. I think that the chance is small this would be true for a CRC, so I think for this ecu there is not CRC used in record 003E.
Same would be true for the previous record 003D where it is all 00000000.

Here is some 003E record which does have a valid CRC:

00011600  3E 00 99 A1 A1 0B 00 00 00 00 00 00 00 00 00 00  >.™¡¡...........
00011610  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00011620  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00011630  3D 00 0E 00 FF FF 00 00 AC B7 B8 C0 FF 0F FF 0F  =...ÿÿ..¬·¸Àÿ.ÿ.
00011640  FF 0F FF 0F 00 00 00 00 00 00 00 00 00 00 00 00  ÿ.ÿ.............
00011650  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00011660  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00011670  00 00 00 00 00 00 00 00 3F 00 00 00 0D 4A AB 78  ........?....J«x



Rgs H2Deetoo
Logged
Davidik
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 7


« Reply #89 on: January 15, 2023, 06:51:56 AM »

can't get the original checksum
Logged
Pages: 1 ... 4 5 [6] 7 8 9
  Print  
 
Jump to:  

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