CAN-BITRATE: can-up enabled per device unit; the udev SYSTEMD_WANTS rule is gone
/ crosscheck (push) Successful in 1s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-13 17:54:42 +09:00
parent bfd45a8508
commit b25267e713
+5 -4
View File
@@ -16,10 +16,11 @@ The OBD port is **not** gatewayed: broadcast traffic is visible passively.
Persisted (boot and hot-plug): 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` is **enabled with `WantedBy=sys-subsystem-net-devices-%i.device`**: systemd starts it whenever
`can-up@can_pcan.service`. It first matched `NAME=="can_pcan"`, which never matches on udev 249, so hot-plug left the `can_pcan` appears, at boot or on hot-plug. It replaced `/etc/udev/rules.d/71-can-up.rules` (2026-10-13), whose
interface down and the 2026-10-13 run recorded nothing. Fixed that day; check `can_pcan` is UP after the next replug. `SYSTEMD_WANTS` never reached systemd, by `NAME==` or by USB id: the interface stayed down on hot-plug and at boot,
- `/etc/systemd/system/can-up@.service`: oneshot; reads `/etc/default/can-<iface>`, sets the bitrate and options, brings the interface up, and stops with the device 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-<iface>`, 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"` - `/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` **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`