commaai / panda

code powering the comma.ai panda
MIT License
1.5k stars 744 forks source link

IsoTpMessage: extend timeout on first frame response #1933

Closed sshane closed 3 months ago

sshane commented 3 months ago

Try 2 of https://github.com/commaai/panda/pull/1487 and https://github.com/commaai/panda/pull/1610. Potentially fixes https://github.com/commaai/openpilot/issues/32242

In short, this adds checks to first and single ISO-TP frame types. If you receive a first frame, the next message must be consecutive, or the new assertions in first and single are raised. You can receive as many single frames as you want without issue.

An additional rx length check is added to ensure that rx_dat isn't unset in the first frame hook (it previously accepted m._isotp_rx_next(b'\x10\x08')) which isn't a valid CAN frame size.


This would cause the EPS to now successfully respond for:

sshane commented 3 months ago

Cases we need to handle for VW:

cases that should pass:

cases that should fail: