<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Michael, <div class=""><br class=""></div><div class="">I have now switched to obdii requests</div><div class=""><br class=""></div><div class="">Have now worked out the commands need to be sent quickly </div><div class=""><br class=""></div><div class="">I now get </div><div class=""><pre class="c-mrkdwn__pre" data-stringify-type="pre" style="box-sizing: inherit; margin-top: 4px; margin-bottom: 4px; padding: 8px; --saf-0: rgba(var(--sk_foreground_low,29,28,29),0.13); line-height: 1.50001; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; border: 1px solid var(--saf-0); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background: rgba(var(--sk_foreground_min,29,28,29),0.04); counter-reset: list-0 0 list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; orphans: 2; widows: 2; text-decoration-thickness: initial; font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important;">OVMS# obdii can1 request device 735 7b5 1003
735[7b5] 1003: Response:
00 32 01 f4 | .2..
I (57401468) webserver: HTTP POST /api/execute
I (57401478) webcommand: HttpCommandStream[0x3f8b52a0]: 3499452 bytes free, executing: obdii can1 request device 735 7b5 2ee01040ea85ce
OVMS# obdii can1 request device 735 7b5 2ee01040ea85ce
735[7b5] 2ee01040ea85ce: ERROR: request failed with response error code 33 securityAccessDenied</pre><div class=""><br class=""></div><div class="">So obviously do need security so have now done a </div><div class=""><pre class="c-mrkdwn__pre" data-stringify-type="pre" style="box-sizing: inherit; margin-top: 4px; margin-bottom: 4px; padding: 8px; --saf-0: rgba(var(--sk_foreground_low,29,28,29),0.13); line-height: 1.50001; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; border: 1px solid var(--saf-0); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background: rgba(var(--sk_foreground_min,29,28,29),0.04); counter-reset: list-0 0 list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; orphans: 2; widows: 2; text-decoration-thickness: initial; font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important;">OVMS# obdii can1 request device 735 7b5 1003
735[7b5] 1003: Response:
00 32 01 f4 | .2..
I (64032248) webserver: HTTP POST /api/execute
I (64032258) webcommand: HttpCommandStream[0x3f8b5268]: 3499932 bytes free, executing: obdii can1 request device 735 7b5 2701
OVMS# obdii can1 request device 735 7b5 2701
735[7b5] 2701: Response:
3a 07 4e 87<span style="color: rgb(209, 210, 211);" class=""> | :.N. </span></pre><div class=""><br class=""></div></div><div class="">And get a seed back :-)</div><div class=""><br class=""></div><div class="">But without access to a services device I guess its going to be hard to work out the encryption !</div><div class=""><br class=""></div><div class="">
Regards<br class="">Shane </div><div><blockquote type="cite" class=""><div class="">On 25 Oct 2021, at 12:46, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Shane,<br class=""><br class="">not sure why you don't use the OBD request command for this instead of manual frame assembly.<br class=""><br class="">However, regarding writes to PIDs:<br class=""><br class="">- You may need another session type. Most cars now won't accept 03 as a session with PID write access, but expect some custom session type to allow that. The NRC 7F means "serviceNotSupportedInActiveSession" (btw: the OBD command translates the most common NRCs for you), which is a hint you need another session.<br class=""><br class="">- You normally don't need tester presence if you send the request shortly after the session init. Most devices will keep a session logged in for at least 60 seconds, custom session types may expire faster. Use a script if in doubt, or start a tester presence signal using the "re obd tester" subcommand.<br class=""><br class="">- I doubt you do, but if (!) you really need security access (request 27), that will normally work differently. See section 9.4 in the ISO document: you need to create a key from the seed given by the server. So you need to know how to calculate the key, which normally involves some non-obvious encryption method. You may be able to derive the method from looking at CAN logs of a service device gaining access.<br class=""><br class="">I would try other session types first.<br class=""><br class="">Hint: you can use a script to walk through a range of session types and try the write after each one.<br class=""><br class="">See: <a href="https://docs.openvehicles.com/en/latest/userguide/scripting.html#ovmsvehicle" class="">https://docs.openvehicles.com/en/latest/userguide/scripting.html#ovmsvehicle</a> → OvmsVehicle.ObdRequest(arguments)<br class=""><br class="">Be aware that's a synchronous call, so don't let the loop run for longer than 60 seconds to avoid the watchdog.<br class=""><br class="">Regards,<br class="">Michael<br class=""><br class=""><br class="">Am 25.10.21 um 11:06 schrieb Shane @ Kilve Engineering:<br class=""><blockquote type="cite" class="">Hi all,<br class=""><br class="">Can anyone give me some help trying to write data to the TPMS ecu?<br class=""><br class="">I can read for example FL tyre using<br class="">can can1 tx standard 735 03 22 e0 10 00 00 00 00 (FL id e010 FR e020 etc.)<br class="">And get back 07 62 e0 10 80 2d b9 d4<br class=""><br class="">I have confirmed that the tyre id is "80 2d b9 d4” with a tmps reader wireless at the wheel<br class=""><br class="">I have then done a session control with<br class="">can can1 tx standard 735 02 10 03 00 00 00 00 00<br class="">And get back 06 50 03 00 32 01 f4 00<br class="">So that looks ok ?<br class=""><br class="">So I then try<br class="">can can1 tx standard 735 07 2e e0 10 40 ea 85 ce (the new id)<br class="">And get back 03 7f 2e 7f<br class=""><br class="">So ive tried issuing<br class="">can can1 tx standard 735 02 27 01 00 00 00 00 00<br class=""><br class="">But get no response??<br class=""><br class=""><br class="">any pointers?<br class="">p.s. do I also need to be sending tester present to the ecu? Or does the fact im doing a session control take care of this?<br class=""><br class=""><br class="">Regards<br class="">Shane<br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></blockquote><br class="">-- <br class="">Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<br class="">Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<br class=""><br class=""><br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></div></blockquote></div><br class=""></div></body></html>