Quote from: willemml on March 02, 2025, 02:38:48 AM
Got security access working. Wound up having to do the $23/$3B hack to disable the security fail timeout because otherwise debugging was too slow, wound up being a byte order issue...
Cannot get into programming mode for some reason though, but developer mode seems to work. Stuck with repeated response pending negative replies until eventual timeout (10 seconds).
Is it stuck on the first StartDiagnosticSession 0x85 or after the seed has been resolved? I haven't worked with KWP2000 ECUs, but on some TP2.0 ECU, the following does the trick:
- Once the seed is resolved, let the connection time out
- Once disconnected, re-init the KWP2000 connection
- *You can either try to go straight to RequestDownload or try StartDiagnosticSession 0x85, then RequestDownload
It might be possible the ECU only allow a programming session on specific timing parameters. You could also use ODIS-E to flash a SGO and sniff the communication line. You would get the full payload to handle flash programming
For the SA2 implementation, it seems you are using this one:
0x68,0x05,0x81,0x4A,0x05,0x87,0x5F,0xBD,0x5D,0xBD,0x49,0x4C
(Loop 5 times: rotate shift left (RSL), if carry is clear - skip XOR, XOR 0x5FBD5DBD)
If you plan to expand to more ECU in the future, it could be interesting to do a full implementation. Although, I think most, if not all ME7, uses the same one
*Removed code suggestion
Great work so far, love to see the frequent updates and a Rust project I can keep up with. Very interesting language