rnd-ash / OpenVehicleDiag

A rust based cross-platform ECU diagnostics and car hacking application, utilizing the passthru protocol
GNU General Public License v3.0
804 stars 93 forks source link

[Feature] Volkswagen TP2.0 transport support #44

Open baconwaifu opened 2 years ago

baconwaifu commented 2 years ago

Volkswagen (used to?) use a proprietary CAN transport protocol for diagnostics in the post-k-line cars, but the contents are just standard KWP2000.

Depending on how modular the code is, it may be possible since the core operation is similar to ISO-TP, just with a "connection" to keep alive on top of the KWP diag session. I have a basic implementation in my pyVCDS repository, and am willing to help with testing and implementing when I have free time, although I only have socketCAN adapters.

srdjanradojcic commented 2 years ago

TP2.0 is still used today, I have seen it in 2020 models. J2545-2 interface support TP2.0, but as I havent had luck connecting my JBoxes with OpenBehicleDiag for now, it should work in theory?

rnd-ash commented 2 years ago

Does anyone have any packet traces on how this works? I could imagine its some variation of UDS diagnostic layer.

Also, consider raising the issue here: https://github.com/rnd-ash/ecu_diagnostics (OpenVehicleDiag will soon transition to using this crate for the diagnostic layer with the vehicle)

srdjanradojcic commented 2 years ago

TP2.0 covers Network and Transport OSI layer, same as ISo15765(ISO-TP). Same as ISO-TP on top of it, you can use other Application/Service layers such as UDS/KWP2000.

I could provide support, you can reach me via email.

rusefillc commented 2 years ago

@baconwaifu @srdjanradojcic transport layer is a step forward but what about application/service layers? Does anyone has any relevant dictionaries for instance for ID to data point mappings? Like where would one find MAP or MAF sensor for instance?

rnd-ash commented 2 years ago

To add to this, TP2.0 would be added as a layer in OVD, but you would still need to write a description JSON in order to tell OVD how to read the data responses from the ECU, and parse them in meaningful ways, like what @rusefillc is saying

Sidenote. A new Schema is under development as well as a new version of the app, so things are subject to change :)