Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bug report
description: Something in OpenDiag does not behave as documented.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
For results from a real vehicle or bench module, use the hardware test report template instead.
Remove VINs and other identifying data from logs before posting.
- type: input
id: version
attributes:
label: OpenDiag version (from `opendiag --version`)
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Platform
options: [Linux, Windows, macOS]
validations:
required: true
- type: textarea
id: what
attributes:
label: What happened, and what did you expect?
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce (simulator commands preferred)
validations:
required: true
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature request
description: Propose a feature or improvement.
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What problem does this solve?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed behaviour
validations:
required: true
- type: textarea
id: sources
attributes:
label: Public sources for any protocol or data involved
description: Specs, open source projects or your own captures. Proprietary datasets (Ross-Tech labels, ODIS, BMW PSdZData) cannot be used.
- type: markdown
attributes:
value: |
Out of scope: flashing or ECU reprogramming, and anything that bypasses immobiliser, odometer or tuning protection.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Summary
<!-- What changes and why. Link issues with "Closes #N". -->

## Checklist
- [ ] `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo test --workspace` pass
- [ ] No test depends on hardware (use Simulator or Replay)
- [ ] Protocol sources are recorded in `docs/sources.md`
- [ ] Clean-room: no Ross-Tech labels, VCDS/ODIS data or other proprietary datasets
- [ ] Any new vehicle write goes through the guarded flow and is added to `crates/opendiag-services/tests/write_safety.rs`
- [ ] Data contributions include provenance and are CC0-1.0

## Verification
<!-- Simulator only, or captured on real hardware? Say which; nothing is verified on a car unless stated. -->
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
commit-message:
prefix: "chore(deps)"
groups:
cargo-minor-patch:
update-types: [minor, patch]
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: "chore(ci)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Cargo.lock.bak
node_modules/
*.log
.env
/builds/
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ cargo run -p opendiag-cli -- --version

Before each phase, produce a short plan and acceptance tests, then implement.

Status: phases 0-2 are largely done (transports, ISO-TP, UDS, KWP2000, KW1281, serial and SocketCAN drivers). Phase 3 (read-only MVP) is in progress: the CLI works against a virtual ECU, and `probe` can talk to a real K-line module. Not done: TP2.0, services/CLI wiring for KWP2000 and KW1281, live-data logging, the open data format. Nothing has been verified against a real car yet.
Status: phases 0-2 are largely done (transports, ISO-TP, UDS, KWP2000, KW1281, serial and SocketCAN drivers). Phase 3 (read-only MVP) is in progress: the CLI works against a virtual ECU, and `probe` can talk to a real K-line module. BMW F-series (ENET/HSFZ, `opendiag-bmw`, see `docs/bmw.md`): step 1 read-only, simulator-tested only. Never bundle BMW proprietary data. Not done: TP2.0, services/CLI wiring for KWP2000 and KW1281, live-data logging, the open data format. Nothing has been verified against a real car yet.
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ members = [
"crates/opendiag-proto",
"crates/opendiag-services",
"crates/opendiag-data",
"crates/opendiag-bmw",
"crates/opendiag-bmw-coding",
"crates/opendiag-cli",
"crates/opendiag-web",
]
Expand Down
4 changes: 4 additions & 0 deletions PROJECT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ Key design points:
- Packaging: Windows installer, AppImage/deb, Homebrew. Signed releases.
- Optional: ESP32/STM32 firmware adapter, headless "diag server" on a Pi/homelab with web UI.

### Phase B - BMW F-series over ENET (branch `feat/bmw-backend`)

Status: steps 1-3 done and **simulator-tested only**. New crate `opendiag-bmw`: HSFZ framing, TCP gateway session, UDP discovery, VIN / I-level / FA reads, mock gateway, `opendiag bmw` CLI. UDS now runs over a `MessageLink` trait so HSFZ reuses the VAG-proven client. Step 2 added: ECU scan, BMW hex DTC read and guarded clear (in `write_safety.rs`), raw DID live logging, a small unverified ECU address table. Step 3 added: guarded raw block write/restore (`opendiag-services::block`, backup-first, read-back verify, in `write_safety.rs`; DID supplied by the user). Also done: `--brand vag|bmw|auto` router with `serve` for BMW, and `opendiag-bmw-coding` (our own definition format, decode/encode by field name). Next: see the design for the real-file decode, `Vehicle` and the launcher in [docs/design-bmw-coding-and-launcher.md](docs/design-bmw-coding-and-launcher.md) (design only). See [docs/bmw.md](docs/bmw.md).

## 5. Repo layout

```
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ An open source, cross-platform diagnostic suite for VAG group vehicles (VW, Audi
| Transports | Serial K-line (Windows/Linux/macOS), SocketCAN (Linux), ELM327-style adapters (degraded, UDS over 11-bit CAN), Simulator, Replay |
| Modules | `scan` and `dtc read/clear` work on KW1281 (`--slow-init`), KWP2000 on K-line (`--fast-init`) and KWP2000 over TP2.0 on CAN (`--can`, Linux); live data and adaptation are KW1281 only |
| CLI | `scan`, `dtc read/clear`, `report` (standalone HTML), `serve` (read-only local web page), `doctor` (support summary), `log` (live data to CSV), `adaptation read/set`, `backup list/restore`, `probe`, `ports`, `capture`, `--trace` on all hardware commands, `data validate/schema` |
| BMW (F-series, ENET) | **Experimental, simulator-tested only, never run on a real car.** `opendiag bmw discover/ident/did/scan/dtc/live`: HSFZ over TCP, UDP discovery, VIN / I-level / FA reads, ECU scan, fault codes (read, and guarded clear), raw DID logging, guarded raw block write/restore. Unverified protocol details are listed in [docs/bmw.md](docs/bmw.md) |
| Data | Open YAML format with validator and generated JSON Schema (CC0-1.0) |

## Install
Expand Down
22 changes: 22 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Security policy

## Reporting a vulnerability

Please report security issues privately through GitHub's
[private vulnerability reporting](https://github.com/JoeeDeveloper/OpenDiag/security/advisories/new)
rather than a public issue. Include the version, platform and steps to reproduce.

This is a hobby project with no fixed response time; reports are handled on a best-effort basis.

## Scope

In scope: memory-safety or parsing bugs in the protocol decoders, flaws in the guarded write flow
(a write that skips the durable backup, confirmation or read-back), and the `serve` HTTP interface.

Out of scope: requests to bypass immobiliser, odometer or tuning protection, or to add flashing support.
These are refused by design (see [docs/safety.md](docs/safety.md)).

## Status

OpenDiag has not been verified against real vehicles ([docs/status.md](docs/status.md)). Do not rely
on it for safety-critical decisions, and use write functions only on a bench module you can afford to lose.
16 changes: 16 additions & 0 deletions crates/opendiag-bmw-coding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "opendiag-bmw-coding"
description = "Name-based view of raw coding blocks, from our own open definition format. Pure: it never talks to an ECU."
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true

[dependencies]
opendiag-core = { path = "../opendiag-core" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[lints]
workspace = true
Loading
Loading