Chrysler: reliable fuzzy fingerprinting - #3520
Open
flowmar47 wants to merge 3 commits into
Open
Conversation
FCA firmware versions are an 8-character part number followed by an alphabetical software revision (e.g. 68227902AF). Part numbers are platform- and model-year-specific while the revision updates with new software, so match on part numbers for the combination meter, SRS, ABS, and EPS ECUs, ignoring the revision. No two supported platforms share all of these part numbers, and a candidate only matches if every one of its platform-code ECUs is present live with a known part number. Replaying the last two years of Chrysler fingerprint database additions, this would have fingerprinted 17 of 28 newly-added FW combinations with zero mismatches; the misses added new trim-specific part numbers rather than new revisions. Fixes commaai#1092
Contributor
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
Contributor
Car behavior reportReplays driving segments through this PR and compares the behavior to master. Testing 40 segments for: CHRYSLER_PACIFICA_2018_HYBRID, CHRYSLER_PACIFICA_2019_HYBRID, CHRYSLER_PACIFICA_2018, CHRYSLER_PACIFICA_2020 ✅ 0 changed, 40 passed, 0 errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements fuzzy fingerprinting for Chrysler/Dodge/Jeep/Ram. Resolves #1092.
FCA firmware versions are an 8-character part number followed by an alphabetical software revision, e.g.
68227902AF/68267018AO(engine responses carry a trailing space). Part numbers are platform- and model-year-specific; only the revision changes with software updates. Following the Ford/Hyundai custom fuzzy matching pattern:FW_PATTERNparses every FW version currently in the Chrysler database, including22DTRHD_AAandM2370131MB.get_platform_codes()extracts the part number, discarding the revision.match_fw_to_car_fuzzy()accepts a candidate only if all of its platform-code ECUs (combinationMeter,srs,abs,eps) are present live with a matching part number. Combination meter part numbers are never shared between platforms; ABS/EPS/SRS parts are shared only between some sibling platforms (e.g. Durango / Grand Cherokee 2019), so requiring all of them keeps matches unique — including for the hybrid platforms, which have no ABS entry.Tests in
opendbc/car/chrysler/tests/test_chrysler.pymirror the Ford suite: every DB version parses, each platform fuzzy-matches only itself, unseen revisions of known parts still match, and unknown part numbers / missing ECUs match nothing.Tested against past fingerprint PRs: replaying the last ~2 years of additions to
opendbc/car/chrysler/fingerprints.py, matching each commit's newly-added FW against the pre-commit database, this fuzzy matcher would have fingerprinted 17 of 28 newly-added FW combinations with zero mismatches. The 11 misses all introduced new trim-specific part numbers (not new revisions), where staying unmatched is the safe behavior.Validation