diff --git a/docs/BOM.md b/docs/BOM.md index fcdb70e..1e9b20c 100644 --- a/docs/BOM.md +++ b/docs/BOM.md @@ -12,7 +12,7 @@ type: reference | **USB ID** | `0c72:000c` | | **Purpose** | USB-to-CAN adapter for reading car CAN bus traffic | | **Interface** | SocketCAN netdev | -| **Default bitrate** | 500 kbps | +| **Bitrate** | 500 kbps, measured on the Z27AG OBD port (listen-only by default; see [CAN bitrate plan](impl/plans/CAN-BITRATE.md)) | | **Driver** | PEAK proprietary driver 9.2.0 (netdev build) — out-of-tree module, must be rebuilt after kernel updates | ### Notes diff --git a/docs/impl/plans/CAN-BITRATE.md b/docs/impl/plans/CAN-BITRATE.md index 1a91edf..cb9c5cd 100644 --- a/docs/impl/plans/CAN-BITRATE.md +++ b/docs/impl/plans/CAN-BITRATE.md @@ -1,10 +1,28 @@ --- type: plan -status: active +status: done updated: 2026-10-09 --- # CAN Bitrate for the Z27AG: Measure in the Car +## Result (2026-10-09, in the car, ignition on, PCAN terminator off) + +**500 kbps.** `can-bitrate-probe`: 2673 frames in 3 s at 500k with zero RX errors, 0 frames at every other rate. +The OBD port is **not** gatewayed: broadcast traffic is visible passively. + +10 s listen-only capture (`~/can-captures/z27ag-20261009-163736-ign.log`, `candump -L` format): **27 IDs, ~893 frames/s** +(≈22% bus load), all periodic at 5 / 10 / 25 / 50 / 100 Hz. IDs: `0C0` (100 Hz), `119 139 13D 149 14D 156 210 231 235 300 312 443` +(50 Hz), `239 423 42F 447 570 573` (25 Hz), `2F1` (10 Hz), `159 449 710 711 712 713` (5 Hz), `152` (2 Hz). + +Persisted (boot and hot-plug): + +- `/etc/udev/rules.d/71-can-up.rules`: on add of `can_pcan`, wants `can-up@can_pcan.service` +- `/etc/systemd/system/can-up@.service`: oneshot; reads `/etc/default/can-`, sets the bitrate and options, brings the interface up, and stops with the device +- `/etc/default/can-can_pcan`: `BITRATE=500000`, `CAN_OPTS="listen-only on restart-ms 100"` + +**Listen-only stays on during the sniffing phase**, so the adapter never ACKs on the car's bus. When `obd-poller` (the single writer) exists, +remove `listen-only on` there and restart the unit. + ## Goal Find the bitrate of the bus reachable at the OBD port of the Mitsubishi Colt (Z27AG), then make `can_pcan` come up with it automatically.