BMCLI replay
命令名、参数与机器可读字段保持英文,以便直接复制到终端或交给 AI 使用;当前安装版本的精确契约请以
bmcli help ... --format=json为准。
Online (host-side) replay of an ASC log file to the CAN bus. For on-device
replay from the device’s flash, use offline replay start (see
offline).
replay start
Section titled “replay start”bmcli replay start --channel=0 --file=logfile.ascbmcli replay start --channel=10356/0 --file=logfile.asc --loop --speed=2# Replay a file recorded on a different channel as-is:bmcli replay start --channel=10356/0 --file=recorded_on_ch2.asc --ignore-channel# Fixed 20ms inter-frame gap instead of original timestamps:bmcli replay start --channel=0 --file=logfile.asc --msg-delay=20# As fast as possible (back-to-back):bmcli replay start --channel=0 --file=logfile.asc --ignore-timestamp# Loop with 500ms gap between iterations:bmcli replay start --channel=0 --file=logfile.asc --loop --cycle-delay=500| Option | Default | Description |
|---|---|---|
--channel |
(required) | Channel list (comma-separated SN/port, UID/port, or legacy index). Opened in listed order; the i-th opened channel is routing position i (1-based). Single channel = position 1 only. |
--file |
(required) | ASC log file path |
--speed |
1.0 |
Speed multiplier (2 = twice as fast). Only meaningful in retain-timestamp mode. |
--loop |
off | Loop cyclically |
--ignore-channel |
off | Send every frame to the first opened channel (single-channel dump), bypassing positional routing. |
--map-channel=<asc_ch>:<spec> |
(none) | Override: route ASC channel <asc_ch> to physical channel <spec>. Repeatable. See routing rules below. |
--map-strict |
off | Only ASC channels with an explicit --map-channel entry are sent; all others are skipped (and counted as errors). Disables positional default. |
--msg-delay=<ms> |
(off) | Fixed inter-frame delay, overrides original timestamps. 0 = back-to-back. First frame is always sent immediately. |
--ignore-timestamp |
off | Semantic alias for --msg-delay=0: send frames back-to-back with no inter-frame delay. |
--cycle-delay=<ms> |
0 |
Gap between loop iterations (only with --loop). |
Channel routing (per frame, highest-precedence first). The hardware port number is not consulted — ASC channel numbers are purely positional:
- explicit
--map-channel=N:specmatch → mapped channel --map-strict→ skip + count as error--ignore-channel→ first opened channel (--channelposition 1)- positional: ASC channel N → the N-th opened channel (if N is within the opened list)
- otherwise → skip
So with --channel=A,B,C opened, ASC ch1→A, ch2→B, ch3→C by default. ASC ch4 (no position 4) is skipped unless --ignore-channel or mapped. With a single --channel=A, only ASC ch1 is sent by default — use --ignore-channel to dump all frames onto A, or --map-channel=N:A to route a specific channel there.
# Multi-channel recording -> multi-channel hardware (purely positional)bmcli replay start --file=multi.asc --channel=10356/0,10356/1,10357/0# ASC ch1->10356/0, ch2->10356/1, ch3->10357/0
# Override specific channels (map on top of positional)bmcli replay start --file=multi.asc --channel=10356/0 \ --map-channel=1:10356/2 --map-channel=3:10357/0 --map-strict# ch1->10356/2, ch3->10357/0; everything else skipped (strict)
# Single channel, dump entire file onto itbmcli replay start --channel=10356/0 --file=recorded_on_ch5.asc --ignore-channel--map-channel resolves its spec independently of the --channel list (it opens the target channel). Do not list the same physical port in both --channel and --map-channel (the device-port open will fail — ports are exclusive).
Timing modes (evaluated in this order):
--ignore-timestamp→ back-to-back, no delay--msg-delay=<ms>→ fixed delay between every frame- default → retain original inter-frame timestamps (scaled by
1/speed)
In all modes the first frame of each loop iteration is sent immediately (its timestamp is treated as the base, not waited on) — matching BUSMASTER’s behavior.
ASC format support: Both classic CAN and CAN FD messages. Classic format supports old (Ext/Std + R/T) and new Vector (Rx/Tx) styles.
replay stop
Section titled “replay stop”bmcli replay stopIn standalone mode, use Ctrl+C.
replay status
Section titled “replay status”Survey of all replay-capable entities (mirror of logging status). Does NOT require --channel.
$ bmcli replay status[host] active=yes channels=10356/0 file=x.asc sent=1234[dev 10356] replay=off[dev 10357] replay=on mode=always_on channels=0x0001 path=stored.asc cyclic=yes[host]— host-side (online) replay, tracked by the daemon.[dev SN]— each USB device’s on-device replay state viaBM_GetReplay.
Optional --channel=<spec> filters to the matching entity.
权威来源: bmcli_reference.md in the BMCLI repository. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.