From b25267e713a53605000cf7e8475164e591c9b4c9 Mon Sep 17 00:00:00 2001 From: Mikkeli Date: Tue, 13 Oct 2026 17:54:42 +0900 Subject: [PATCH] CAN-BITRATE: can-up enabled per device unit; the udev SYSTEMD_WANTS rule is gone Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz --- docs/impl/plans/CAN-BITRATE.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/impl/plans/CAN-BITRATE.md b/docs/impl/plans/CAN-BITRATE.md index 9c35a17..3df9b32 100644 --- a/docs/impl/plans/CAN-BITRATE.md +++ b/docs/impl/plans/CAN-BITRATE.md @@ -16,10 +16,11 @@ The OBD port is **not** gatewayed: broadcast traffic is visible passively. Persisted (boot and hot-plug): -- `/etc/udev/rules.d/71-can-up.rules`: on add of the PEAK (USB 0c72:000c, matched like `70-can-names.rules`), wants - `can-up@can_pcan.service`. It first matched `NAME=="can_pcan"`, which never matches on udev 249, so hot-plug left the - interface down and the 2026-10-13 run recorded nothing. Fixed that day; check `can_pcan` is UP after the next replug. -- `/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 +- `can-up@can_pcan` is **enabled with `WantedBy=sys-subsystem-net-devices-%i.device`**: systemd starts it whenever + `can_pcan` appears, at boot or on hot-plug. It replaced `/etc/udev/rules.d/71-can-up.rules` (2026-10-13), whose + `SYSTEMD_WANTS` never reached systemd, by `NAME==` or by USB id: the interface stayed down on hot-plug and at boot, + so the recorder never opened a session and refused marks ("no session"). +- `/etc/systemd/system/can-up@.service`: oneshot, with that `[Install]` section; 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="restart-ms 100"` **Listen-only was on during the sniffing phase**, so the adapter never ACKed on the car's bus. Dropped 2026-10-12 for `obd-poller`