Repository navigation
Conversation
startDiagnosticSession() skips the session request when currentsession already matches. currentsession was never cleared on a reconnect, so after changing the CAN line (or an automatic reconnect) the session command was not sent again and the ECU stayed in its default session: every 21xx read returned 7F 21 80. Seen on an EDC16CP33 (Espace IV ph2): opening the file connects at Auto (500K, no answer), switching to 250K reconnected without 10C0. Clear currentsession in initELM() so every (re)connect reopens it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@lennardm |
|
Thanks! You're right for current master: #1889 restored that rule yesterday. Before that it had been commented out since e1dd50c, so on the version I was running "Auto" always connected at 500K, which is what #1888 was about. @Furtif : One case #1889 doesn't cover: the scan. scan() calls set_can_addr(addr, {'ecuname': 'SCAN'}, canline) without a brp, so the CAN pass still runs at 500K and finds no CAN ECUs on a 250K bus. I have a small change on my fork (lennardm/ddt4all, branch feature/can-speed-autodetect) that, when no speed is given, listens silently (AT CSM1 + AT MA, nothing transmitted) at 500K and 250K and uses the speed where traffic is seen. Happy to open it as a PR if that's useful. |
|
see my reply to your comment in #1886 |
Problem
After ddt4all reconnects to an ECU, it can keep sending requests without reopening the diagnostic session. The ECU is then in its default session and refuses most reads, so screens stay empty, and the log fills with 7F 21 80 ("service not supported in active diagnostic session") and 7F 3E 80.
This happens whenever the connection is re-initialised, for example:
Cause
startDiagnosticSession() skips the session request (e.g. 10C0) when self.currentsession already matches. currentsession is never cleared when the connection is re-initialised, so after a reconnect ddt4all wrongly assumes the session is still open.
Example on an Espace IV ph2: opening the EDC16CP33 file connects at "Auto" (500K, so the ECU doesn't answer) and records 10C0 as sent. Switching to 250K reconnects, but 10C0 is never sent, so every 21xx read returns 7F 21 80.
Fix
initELM() now clears self.currentsession before connecting, so every (re)connect reopens the session.
Tested on the same car: after switching to "CAN Line 1@250K", the log shows ECU uses SDS 10C0, and all screens (2180, 21A0–21A8, …) read normally.
Goes together with PR #1886