BMCLI daemon
Reference version: BMCLI 1.6.3. Command names, parameters and machine-readable fields retain their source spelling.
Background process keeping channels open for low-latency command execution. Communicates via TCP socket on 127.0.0.1:4502 (cross-platform, same on Windows and Linux).
On Linux, daemon state follows the XDG base-directory convention:
- PID:
$XDG_RUNTIME_DIR/bmcli/daemon_4502.pid; fallback/tmp/bmcli-<uid>/daemon_4502.pid. - Log:
$XDG_STATE_HOME/bmcli/daemon_4502.log; fallback~/.local/state/bmcli/daemon_4502.log. - IPC remains the loopback TCP endpoint above; there is no filesystem socket.
Recommendation: Always specify the real timing, role/mode, and termination or pull-up at startup. The bus type is inferred from channel capability. Incorrect defaults can disturb a physical CAN or LIN network.
daemon start
Section titled “daemon start”# Recommended: stable SN/port and explicit CAN parametersbmcli daemon start --channel=10356/0 --bitrate=500 --termination=120bmcli daemon start --channel=10356/0 --nbitrate=500k --dbitrate=2M --termination=120
# Multi-channel on same devicebmcli daemon start --channel=10356/0,10356/1 --nbitrate=250k --dbitrate=1M --mode=normal --termination=120
# Multi-devicebmcli daemon start --channel=10356/0,10357/0 --nbitrate=500k --termination=120
# LIN master startupbmcli daemon start --channel=10356/4 --mode=master --bitrate=19200 --pullup=1k --power=on
# Legacy index remains supported for temporary interactive usebmcli daemon start --channel=0 --nbitrate=500 --dbitrate=2000 --termination=120| Option | Default | Description |
|---|---|---|
--channel |
— | Channels to open at startup |
--mode |
CAN normal; LIN listen-only |
CAN mode or LIN role |
--nbitrate |
500 |
CAN nominal bitrate kbps |
--dbitrate |
2000 |
CAN data bitrate kbps |
--bitrate |
CAN 500/2000; LIN 19200 |
CAN single-rate shorthand sets nominal=data; N/D remains explicit. LIN uses bps. |
--termination |
120 |
CAN termination: 120 or off |
--pullup |
mode default | LIN pull-up: 1k or off |
--power |
mode default | LIN 12 V output: on or off |
--lin-version |
2.2 |
LIN protocol version |
--checksum |
auto |
LIN checksum model |
Blocks until daemon socket is ready (up to 10s). For CAN startup, shorthand and explicit nominal/data options may be combined only when their normalized values agree. Different CAN FD rates should use the explicit fields.
daemon stop
Section titled “daemon stop”bmcli daemon stopdaemon restart
Section titled “daemon restart”Close and capability-reopen all CAN and LIN channels. Re-applies saved TX tasks; CAN routes are also restored.
bmcli daemon restartdaemon status
Section titled “daemon status”bmcli daemon statusShows: open channel count, PID, uptime.
Daemon features
Section titled “Daemon features”- SN-based channel identification: Channels are tracked by SN+port internally, so recovery after USB reconnection always finds the correct device regardless of enumeration order
- BUSOFF recovery: CAN channels are checked without consuming traffic. Automatic recovery uses a bounded close/reopen to establish a new handle and receive-generation boundary, then restores persistent configuration. LIN channels are excluded from periodic CAN BUSOFF handling.
- Failed reopen safety: Successful internal reopen preserves the same device’s configuration. If enumeration, open, or RX-broker attachment finally fails, the daemon abandons that slot and clears its UDS, TesterPresent, XCP, and control state before the slot may be reused.
- USB reconnect: On USB disconnect (ILLOPERATION), waits 1s then re-enumerates and reopens using stored SN+port
- Config persistence: Txtasks and routes are re-applied after channel recovery
- Background threads: Host logging and replay run in separate threads
Source of truth: BMCLI 1.6.3 repository documentation. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.