Repository navigation
feat(bmw): BMW F-series backend, --brand router and Vehicle trait - #4
Merged
Merged
Conversation
UdsClient is now generic over MessageLink (send, recv, describe). IsoTpLink implements it, so VAG behaviour is unchanged; this lets transports that carry whole UDS messages (BMW HSFZ) reuse the client. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…read-only ident HSFZ framing, TCP gateway session with per-ECU MessageLinks, UDP discovery, VIN / I-level / FA reads, a mock gateway served over localhost sockets, and an `opendiag bmw` subcommand (discover, ident, did). Flash/programming services are refused at the link. Simulator-tested only; unverified protocol details are flagged in code and docs/bmw.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- scan: probe addresses with TesterPresent, count fault codes (read-only) - BmwEcu implements FaultAccess/Module: raw hex DTCs, clear through the existing plan_clear/apply_clear flow (snapshot, typed YES, re-read) - clear over HSFZ added to write_safety.rs under corrupted bytes - live: log DIDs as raw hex CSV on a fixed grid - small unverified ECU address table (labels only) - mock: more ECUs, in-memory LoopbackStream - CLI: opendiag bmw scan | dtc read|clear | live Simulator-tested only; never run against a real car. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- services::block: BlockAccess, plan/apply_block_change, plan_block_restore. Confirmation bound to the change, re-read, flushed full-block backup, write, read-back verify; length changes, no-ops and 0xF1xx refused - BackupRecord gains block/old_hex/new_hex (older records still load) - BmwEcu implements BlockAccess; opt-in extended session, never programming - CLI: opendiag bmw block read|write|restore; backup list shows blocks - block write added to write_safety.rs under corrupted bytes - mock: writable blocks, one that acknowledges but does not keep a write DID is supplied by the user; no coding DID is assumed. Simulator-tested only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Design only. BMW data is read from a user-supplied local path, never bundled; the decoder sits behind a trait and cannot write; the Vehicle trait is extracted from the two implementations; brand is chosen at launch. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…our own format - global --brand vag|bmw|auto: no flag changes nothing; bmw routes serve; auto uses one ENET discovery broadcast and prints its choice - opendiag bmw serve (read-only web page for one ECU); serve loop shared - new crate opendiag-bmw-coding: strict opendiag-bmw-coding/0 definitions with provenance, decode, encode_change (only the field's bits change) - opendiag bmw coding show|set: refuses unknown fields/values, wrong length, software-level mismatch and unstable reads; set uses the guarded block flow - synthetic example in docs/examples; BMW's own files are not read Simulator-tested only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ckends - services::vehicle: Vehicle (identify, scan, ecu as Module, keep_alive), SingleModule for VAG connections, VehicleModule to present one ECU of any vehicle as a Module; identification lines carry a verified flag - bmw::BmwVehicle over the HSFZ gateway, one BmwEcu per address - serve runs both brands through the same path; bmw scan/ident use the trait - no connect() on the trait: connecting shares nothing between brands Behaviour unchanged; full suite passes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xe1HmJJjhbWaBGaF6FKosA
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.
Summary
opendiag-bmwcrate: HSFZ/ENET transport, discovery, read-only ident--brandrouter,bmw serve, and name-based coding from our own synthetic formatVehicletrait inopendiag-services, shared by the VAG and BMW backendsVehicletrait and launcher (docs/design-bmw-coding-and-launcher.md)/builds/Notes
Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace🤖 Generated with Claude Code
https://claude.ai/code/session_01Xe1HmJJjhbWaBGaF6FKosA