-`/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-<iface>`, sets the bitrate and options, brings the interface up, and stops with the device
- Mitsubishi diagnostics of this era use KWP2000 on CAN (MUT-III).
- **500 kbps is the likely answer** (era standard for powertrain and OBD CAN), but nothing found confirms it for the Z27AG, and body networks
(ETACS etc.) on cars of this era often run slower. Hence: measure.
## Procedure (in the car, ignition ON)
1. PCAN-USB on the OBD port (pins 6/14), adapter on the Orin. It appears as `can_pcan`.
2.`sudo can-bitrate-probe can_pcan 3`
It cycles 500k, 250k, 125k, 1M, 100k, 83.3k, 50k and 33.3k in **listen-only** mode (no ACKs, no error frames: a wrong rate can't disturb the bus).
For each rate it prints frames received, the RX error counter, and controller state. **The right rate has frames > 0 and RX errors ≈ 0.**
Wrong rates show 0 frames and/or climbing RX errors.
3. Confirm by watching traffic at that rate, still listen-only:
`sudo ip link set can_pcan up type can bitrate <rate> listen-only on && candump -c can_pcan`, and `cansniffer can_pcan` for changing IDs.
**If every rate shows 0 frames:** the OBD port is probably behind a gateway that stays silent unless queried. Then the bitrate has to be found
by sending one standard OBD-II request (ISO 15765-4: try 500k, then 250k), e.g. mode 01 PID 00 to `0x7DF`. That's transmitting, so it
belongs to the single CAN writer (`obd-poller`, project-yukart decision 3). Do it deliberately, not as part of a sniff.
## After the rate is known
- Persist it for `can_pcan` (systemd-networkd `.network` with `[CAN] BitRate=` and `ListenOnly=yes` for the sniffing role, or a udev/systemd
unit that runs `ip link set ... up` on add). It must survive hot-plug, not just boot.
- Record the result in [DEVICE-NAMING](../reports/DEVICE-NAMING.md) / BOM, and in project-yukart's README (`can_pcan, 500 kbps` is currently an assumption).
-`can_onboard` (MTTCAN) can't go on the bus as is. The Orin's CAN pins are logic level and need an external CAN transceiver (e.g. SN65HVD230 class).
## Probe script
Installed at `/usr/local/sbin/can-bitrate-probe` on the car unit. Source:
```bash
#!/bin/bash
# can-bitrate-probe: find a CAN bus's bitrate without disturbing it.
# Listen-only mode: the adapter sends no ACKs and no error frames, so a wrong bitrate cannot affect the bus.