<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
No issues so far, so I've merged the vwtp20 branch into master now.<br>
<br>
Noteworthy addition along with the VW TP 2.0 support: Duktape
integration of the OBD request function as OvmsVehicle.ObdRequest():<br>
<br>
<a class="moz-txt-link-freetext" href="https://docs.openvehicles.com/en/latest/userguide/scripting.html#ovmsvehicle">https://docs.openvehicles.com/en/latest/userguide/scripting.html#ovmsvehicle</a><br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 30.05.21 um 23:00 schrieb Michael
Balzer:<br>
</div>
<blockquote type="cite"
cite="mid:61be59d5-4103-b419-5b13-b818dceb008f@expeedo.de">Everyone
interested in VW/VAG vehicles: I've added a first implementation
of the VW TP 2.0 protocol in the vehicle poller.
<br>
<br>
I've pushed this to a new branch for testing:
<a class="moz-txt-link-freetext" href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/tree/vwtp20">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/tree/vwtp20</a><br>
<br>
This includes refactoring the ISO TP engine into a separate
module, so may introduce bugs with that. Please do not introduce
larger changes in the master poller code until we've tested and
merged this change.
<br>
<br>
The VW TP 2.0 engine is based on the explanation by Jared
Wiltshire (<a class="moz-txt-link-freetext" href="https://jazdw.net/tp20">https://jazdw.net/tp20</a>) plus some observations &
tests I've made with my Seat Mii.
<br>
<br>
I've added a text version of Jared's page in the vehicle docs
folder:
<br>
<a class="moz-txt-link-freetext" href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/vwtp20/vehicle/OVMS.V3/components/vehicle/docs/VW-TP-2.0.txt">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/vwtp20/vehicle/OVMS.V3/components/vehicle/docs/VW-TP-2.0.txt</a>
<br>
<br>
VW TP 2.0 polls integrate seamlessly into an existing poller list
and can also be sent as single OBD requests. Quoting from
vehicle.h:
<br>
<br>
// VWTP_20: this protocol implements the VW (VAG) specific "TP
2.0", which establishes
<br>
// OSI layer 5 communication channels to devices (ECU modules) via
a CAN gateway.
<br>
// On VWTP_20 poll entries, simply set the TXID to the gateway
base ID (normally 0x200)
<br>
// and the RXID to the logical 8 bit ECU ID you want to address.
<br>
// TP 2.0 transports standard OBD/UDS requests, so everything else
works the same way
<br>
// as with ISO-TP.
<br>
//
<br>
// VW TP 2.0 poll entry examples:
<br>
// // TXID, RXID, TYPE, PID, TIMES, BUS, PROT
<br>
// { 0x200, 0x1f, 0x10, 0x89, {…times…}, 0, VWTP_20 }
<br>
// { 0x200, 0x1f, 0x22, 0x04a1, {…times…}, 0 , VWTP_20 }
<br>
//
<br>
// VW gateways currently do not support multiple open channels. To
minimize connection
<br>
// overhead for successive polls to an ECU, the VWTP_20 engine
keeps an idle connection open
<br>
// until the keepalive timeout occurs. So you should try to
arrange your polls in interval
<br>
// blocks/sequences to the same devices if possible.
<br>
//
<br>
// To explicitly close a VWTP_20 channel, send a poll (any type)
to RXID 0, that just
<br>
// closes the channel (ECU ID 0 is an invalid destination):
<br>
// { 0x200, 0,
0, 0, {…times…}, 0 , VWTP_20 }
<br>
<br>
<br>
To manually send a request, use the "-v" option on the OBD request
command to select VW TP 2.0, e.g.:
<br>
<br>
OVMS# obd can1 req dev -v 200 1f 22f197
<br>
200[1f] 22f197: Response:
<br>
47 57 2d 4b 2d 43 41 4e 20 54 50 32 30 | GW-K-CAN TP20
<br>
<br>
To manually close a channel from the shell, issue:
<br>
<br>
OVMS# obd can1 req dev -v 200 00 0000
<br>
<br>
<br>
Feedback, code audits & tests are welcome.
<br>
<br>
If you encounter errors or misbehaviour, please send me a debug
log including the CAN range 200-3ff:
<br>
<br>
OVMS# log level debug vehicle-vwtp
<br>
OVMS# can log start monitor crtd 200-3ff
<br>
<br>
Regards,
<br>
Michael
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26</pre>
</body>
</html>