gmenounos / kw1281test

VW KW1281 Protocol Test Tool
MIT License
133 stars 17 forks source link

Get SKC for Beetle with Magna Marelli Cluster #50

Closed matzzze closed 10 months ago

matzzze commented 1 year ago

Hi, first of all: Thanks for that awesome open source software!

Trying to get the SKC for a 98 Beetle C1 Europe / Germany.

These are my results:

Connection to the Cluster itself works: Version` 0.85-beta (https://github.com/gmenounos/kw1281test/releases) Args: COM2 9600 17 ReadIdent OSVersion: Microsoft Windows NT 6.1.7601 Service Pack 1 .NET Version: 7.0.11 Culture: en-US Opening serial port COM2 Sending wakeup message Wakeup duration: 1.999998134008076 seconds Reading sync byte Keyword Lsb $01 Keyword Msb $8A Protocol is KW 1281 (8N1) ECU: 1C0919861C KOMBI+WEGFAHRS. M73 V23 Software Coding 00142, Workshop Code: 00000 Sending ReadIdent block Ident: Ident.-Nr. Wegfahrs.:VWZ5Z0W9172559 Sending EndCommunication block

Get SKC doesnt Version 0.85-beta (https://github.com/gmenounos/kw1281test/releases) Args: COM2 9600 17 GetSKC OSVersion: Microsoft Windows NT 6.1.7601 Service Pack 1 .NET Version: 7.0.11 Culture: en-US Opening serial port COM2 Sending wakeup message Wakeup duration: 1.999998134008076 seconds Reading sync byte Keyword Lsb $01 Keyword Msb $8A Protocol is KW 1281 (8N1) ECU: 1C0919861C KOMBI+WEGFAHRS. M73 V23 Software Coding 00142, Workshop Code: 00000 Caught: System.InvalidOperationException Unsupported cluster version. Unhandled exception: System.InvalidOperationException: Unsupported cluster version. at BitFab.KW1281Test.Cluster.MarelliCluster.GetDefaultAddress() in C:\Users\gmeno\src\kw1281test\Cluster\MarelliCluster.cs:line 38 at BitFab.KW1281Test.Cluster.MarelliCluster.DumpEeprom(Nullable1, Nullable1, String ) in C:\Users\gmeno\src\kw1281test\Cluster\MarelliCluster.cs:line 18 at BitFab.KW1281Test.Tester.GetSkc() in C:\Users\gmeno\src\kw1281test\Tester.cs:line 601 at BitFab.KW1281Test.Program.Run(String[]) in C:\Users\gmeno\src\kw1281test\Program.cs:line 253 at BitFab.KW1281Test.Program.Main(String[]) in C:\Users\gmeno\src\kw1281test\Program.cs:line 29

Also the actuator test worked.

Any chance you could help retrieving the SKC if I give you a dump, i did e.g. Version 0.85-beta (https://github.com/gmenounos/kw1281test/releases) Args: COM2 9600 17 DumpMarelliMem 3072 1024 OSVersion: Microsoft Windows NT 6.1.7601 Service Pack 1 .NET Version: 7.0.11 Culture: en-US Opening serial port COM2 Sending wakeup message Wakeup duration: 1.999998134008076 seconds Reading sync byte Keyword Lsb $01 Keyword Msb $8A Protocol is KW 1281 (8N1) ECU: 1C0919861C KOMBI+WEGFAHRS. M73 V23 Software Coding 00142, Workshop Code: 00000 Untested cluster version! You may need to disconnect your battery if this fails. entryH: 0x02, regBlockH: 0x08, count: 0x0400 Sending block 0x6C Writing data to cluster microcontroller Receiving ACK Writing memory dump program to cluster microcontroller (Entry: $0200, RegBlock: $0800, Start: $0C00, Count: $0400) Receiving ACK Receiving memory dump Saved memory dump to marellimem$0C00.bin Done

gmenounos commented 1 year ago

If you attach the dump or email it to me, I can take a look.

matzzze commented 1 year ago

Thanks for your super fast reply! marellimem$0C00.log

Sure here you go. Let me know if I shall execute any other dump commands - i had to change the file extension from bin to log

kerekt commented 1 year ago

Hi!

Try SKC 02800. Found it on address 0202h, 0203h (0AF0h) Let me know if work.

matzzze commented 1 year ago

Thanks a lot! Will try tomorrow and give feedback

On 15 October 2023 19:24:02 CEST, kerekt @.***> wrote:

Hi!

Try SKC 02800. Found it on address 0202h, 0203h (0AF0h) Let me know if work.

-- Reply to this email directly or view it on GitHub: https://github.com/gmenounos/kw1281test/issues/50#issuecomment-1763453298 You are receiving this because you authored the thread.

Message ID: @.***> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

matzzze commented 1 year ago

Thanks a lot! It seems to be the right code - we could login with that code! Let me know if you need anything else. If not, shall I close the ticket?

gmenounos commented 1 year ago

Try SKC 02800. Found it on address 0202h, 0203h (0AF0h) Let me know if work.

I'd like to add support for this cluster to kw1281test. Any idea how to determine which clusters use this offset for the SKC? Other Immo2 Beetle clusters that kw1281test supports (1C0920806G, 1C0920901C, 1C0920905F, 1C0920906A) store the SKC at offset 0313h and 0314h. Is it because this cluster is part number 1C0919xxx instead of 1C0920xxx?

kerekt commented 1 year ago

I checked many different MM dash dumps,there is not exact location, i know 7different,but i think i found a rule for skc location: Clusters with 14Byte ImmoID, SKC is always before the 14byte ImmoID, Clusters without 14Byte ImmoID, SKC is always before the byte sequence 00,01,0F or 00,02,0F or 00,03,0F or 00,04,0F , 2nd byte always vario, dont know what it means, probably matched keys nr, but never checked, maybe you can make a search regexp in dump 00,0?,0F to find the right location, im not a programmer :-)

this solution works on every cluster dump i checked, 4B,8N,8D,8L,1C

gmenounos commented 10 months ago

Ok, I incorporated that algorithm into the new release. Thanks!