gmenounos / kw1281test

VW KW1281 Protocol Test Tool
MIT License
111 stars 14 forks source link

KW2000 connections seem to get rejected #38

Open mvglasow opened 1 year ago

mvglasow commented 1 year ago

Steps to reproduce

Connect to an ECU which communicates using KWP2000 over K-line and perform a ReadIdent. ECUs I have tried (all of them in a 2005 Audi A4, type 8E/B7):

Expected result

Connection is successful and the ECU responds with its identification data (at least dealer part no., identification string). After reading the README, I would expect at least rudimentary functionality.

Actual result:

The connection seems to get refused outright when the protocol is not KW1281:

$ kw1281test ACDCBLAH 10400 37 ReadIdent
KW1281Test: Yesterday's diagnostics...Today.

Version 0.80-beta (https://github.com/gmenounos/kw1281test/releases)
Args: A50285BI 10400 37 ReadIdent
OSVersion: Unix 5.15.0.67
.NET Version: 7.0.0
Culture: en-US
Opening FTDI serial port A50285BI
Sending wakeup message
Wakeup duration: 2.000000012 seconds
Reading sync byte
Keyword Lsb $EF
Keyword Msb $8F
Protocol is KW 2031 (8N1)
Caught: System.InvalidOperationException Expected KWP1281 protocol.
Unhandled exception: System.InvalidOperationException: Expected KWP1281 protocol.
   at BitFab.KW1281Test.Tester.Kwp1281Wakeup(Boolean ) in C:\Users\gmeno\src\kw1281test\Tester.cs:line 36
   at BitFab.KW1281Test.Program.Run(String[]) in C:\Users\gmeno\src\kw1281test\Program.cs:line 256
   at BitFab.KW1281Test.Program.Main(String[]) in C:\Users\gmeno\src\kw1281test\Program.cs:line 26

Software environment

kwp1281test 0.80-beta, Ubuntu 22.04, libftd2xx.so.1.4.27

Additional information

Due to #37, I get to this error in only 50% of cases, depending on the ECU address (for the others I do not even get this far).

If KW2000 needs to be specifically enabled (due to its still-experimental nature), that should be documented somewhere.

gmenounos commented 1 year ago

kw1281est only uses the kw2000 protocol to dump the EEPROM of Bosch RB4/RB8 clusters and EDC15 ECUs. For everything else, it uses the kw1281 protocol. I can probably add the ability to perform simple commands like ReadIdent for modules that only speak kw2000, but I can't promise when I'll have time for that.

mvglasow commented 1 year ago

No problem (though ReadIdent, software coding and adaptation on KW2000 would of course be nice). I‘ve added that in the wiki.

For now, a more descriptive error message would help – “expected KWP1281 protocol” sounds as if KW2000 is not supported at all, which is not the case. A better wording would be something like “this operation is currently not supported on KW2000”.