J2534 Support#101
Merged
Merged
Conversation
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.
Hi! I have been using this for the past few weeks as part of a rewrite of my VW reflashing stuff and it seems to be doing well.
I will gladly admit this was mostly Claude'd, but I fixed the Claude mistakes as I went and I have hand-reviewed the code and confirmed that I can reflash using both the native and adapter ISO-TP versions, so that's a pretty strong integration test IMO.
What does this do:
async_can, mostly not double-panicking if the adapter dropped before the parent Drop.Syncfrom AsyncCanAdapter itself, it's not needed in this location.src/j2534with J2534 adapter code. There are two adapters here, j2534::CanAdapter which follows the patterns from the AsyncCanAdapter throughout the project, and j2534::IsoTpAdapter which instead implements the new IsoTpTransport (replacing IsoTpAdapter) which allows the use of J2534 adapters which have firmware-implemented ISO-TP. Both implementations uselibloadingto load up the J2534 DLL and create pointers to the J2534 API functions.Support for J2534 is a bit incomplete; only native CAN and ISO15765 are supported on the native pins, not any other protocols (although the crate in general doesn't really support anything else, so this is probably OK) and not any weird pin setup / voltage setup / hackery IOCTLs. Extended address support seemed to work but is mostly untested.
Testing:
Weird gotchas:
As you know, I am unfortunately cleaning out my automotive closet as I may have to take a hiatus from this line of work, but I will try to support feedback and get this through as time allows.