Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panda Universal Forwarding #6

Merged
merged 5 commits into from
Sep 13, 2018

Conversation

James-T1
Copy link

PUF implements automatic forwarding of car/camera buses based on "universal" vehicle fingerprints. Initial support is for Hyundai/Kia, but PUF is designed to be easily extended to other manufacturers and for more complicated forwarding if necessary.

The Hyundai fingerprint included was created by taking the intersection of all of the existing Hyundai fingerprints and then doing a frequency analysis of the remaining packets on the CAN bus for my vehicle. Only messages with a rate at least 10% of the maximum message rate on bus 0 were included in the final fingerprint.

There's probably a lot of things here that could be done better, but my C-fu is pretty poor so please feel free to criticize, comment, fix or extend as you see fit. I can say however that it appears to work well. It properly identifies my Kia with the included fingerprints, and if I change any single value in the fingerprint it does not forward. Connecting and disconnecting the USB cable works as expected, with the exception that the forwarding is actually predicated upon a lack of USB transfer/control messages and not a disconnection event. This means that shutting down boardd on the Eon is actually enough to get it to switch over into forwarding mode.

There's some constant cpu time spent processing fingerprints when the USB connection is not active, but if necessary I suppose that could be easily overcome by time-limiting the fingerprinting process or using some kind of ignition hook.

Switches? Who needs stinking switches?

PUF leverages the existing Panda framework to enable fingerprinting of entire vehicle classes and then enables forwarding for those vehicles when the Panda's USB connection is inactive.  Initial update includes forwarding for Hyundai/Kia vehicles and supports both the old and new style Giraffe wiring.
Merge changes from emmertex/hyundai-dev ...9-12-18
ALL_CAN_SILENT state is now preserved until fingerprinting matches to ensure backwards compatibility.  can_auto_baud (if used) is also now disabled when fingerprint matches.
@emmertex emmertex changed the base branch from hyundai-dev to community September 13, 2018 23:32
@emmertex emmertex merged commit 03811a8 into emmertex:community Sep 13, 2018
emmertex pushed a commit that referenced this pull request Oct 9, 2018
Push devel to release (version 0.4.7.1)
emmertex pushed a commit that referenced this pull request Oct 9, 2018
removed PDL button (will be included with ACC since makes not sense t…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants