jyoung8607 / openpilot

open source driving agent
MIT License
70 stars 54 forks source link

Refine CRC calculation algorithm #21

Closed jyoung8607 closed 5 years ago

jyoung8607 commented 5 years ago

The VW specific checksum code needs to be refactored so that it works for messages other than HCA_01. The algorithm is CRC-8/AUTOSAR "with a twist", wherein the twist is only partly handled at this time, so we need to complete our understanding in order to proceed.

This is required, for example, to cleanly implement Cancel spam via GRA_ACC_01 for which the CRC currently doesn't work. A static dictionary of replayable messages is possible but not ideal.

If possible, the new method should be integrated in parser.cc and called at the DBC code level like Honda and Toyota, so we can use it for incoming message verification as well.

jyoung8607 commented 5 years ago

Completed in vw-063-base as of today!