BMCLI logging
命令名、参数与机器可读字段保持英文,以便直接复制到终端或交给 AI 使用;当前安装版本的精确契约请以
bmcli help ... --format=json为准。
Online (host-side) CAN traffic recording to ASC. For on-device (offline)
logging to the device’s flash, use logging start --hardware or the equivalent
offline logging start (see offline).
Multi-channel: --channel=A,B,C records all listed channels interleaved into ONE output file. Each frame is tagged with a LOGICAL channel number (1-based position in this recording, NOT the device’s physical port). The file header carries a // ch<N> = SN<serial>/port<physical> mapping comment so the logical numbers can be decoded.
logging start
Section titled “logging start”Record CAN traffic to ASC (or BLF) file. In daemon mode, runs as a background thread (singleton — a 2nd logging start while one is active returns ERROR: logging already active).
bmcli logging start --channel=10356/1 --output=log.ascbmcli logging start --channel=10356/0,10356/1 --output=log.asc --duration=60 # multi-channel -> one filebmcli logging start --channel=10356/0 --output=log.blf --format=blfbmcli logging start --hardware --channel=10356/0,10356/1 --output=log.asc # on-device (== offline logging start)| Option | Default | Description |
|---|---|---|
--channel |
(required) | Channel(s): comma-separated SN/port (e.g. 10356/1), UID/port, legacy index, or name. |
--output |
(required) | Output file path |
--format |
asc |
asc or blf |
--duration |
infinite | Duration in seconds |
--hardware |
off | Record ON-DEVICE to the device’s flash storage (third-gen hw). Equivalent to offline logging start. |
logging stop
Section titled “logging stop”bmcli logging stop # stop host-side recordingbmcli logging stop --hardware # stop on-device recording (== offline logging stop)logging status
Section titled “logging status”Survey of all recording-capable entities. Does NOT require --channel.
$ bmcli logging status[host] active=yes channels=10356/0,10356/1 file=all.asc dur=12s msgs=1234[dev 10356] offline=on mode=always_on channels=0x0003 path=log.asc storage=12/64 MB free[dev 10357] offline=off[host]— host-side (online) recording, tracked by the daemon (standalone mode: a foreground recording IS this process, so nothing to survey).[dev SN]— each USB device’s on-device recording state viaBM_GetLogging. Devices are independent (per-device on/off). Devices without offline storage shown/a.
Optional --channel=<spec> filters to the matching entity. --format=json produces structured output (null fields where a device lacks offline support).
权威来源: bmcli_reference.md in the BMCLI repository. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.