openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Ensure CANParser counter/checksums checks are the same as panda

Open sshane opened this issue 3 years ago • 5 comments

For example, SCM_BUTTONS's counter started returning garbage values (or issue with a cable) and only panda noticed it, causing a controls mismatch.

We need to change how the checks work in the CANParser, if counter or checksum failed, we don't update the last time seen, so it just causes a TIMEOUT error with the same thresholds as it.

http://data-raw.internal/c390b60ad96d2ff2/2022-07-01--07-40-21/4/rlog.bz2

sshane avatar Jul 13 '22 20:07 sshane

This case really looks like a bad cable. We also need a better check than a threshold on bad counters, as some mildly faulty cables can slip through like in this case.

adeebshihadeh avatar Jul 15 '22 02:07 adeebshihadeh

  • [ ] Do same check for checksum

sshane avatar Aug 20 '22 02:08 sshane

@sshane is this done?

adeebshihadeh avatar Nov 03 '22 19:11 adeebshihadeh

Made the counter checks match, I'll check the checksum checks. Might already match

sshane avatar Nov 03 '22 21:11 sshane

@sshane this should be done with the new fuzzing tests right?

adeebshihadeh avatar Jan 05 '24 23:01 adeebshihadeh

I believe so.

sshane avatar Jan 09 '24 01:01 sshane