Skip to content

BMCLI replay

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).

Terminal window
bmcli replay start --channel=0 --file=logfile.asc
bmcli 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:

  1. explicit --map-channel=N:spec match → mapped channel
  2. --map-strict → skip + count as error
  3. --ignore-channel → first opened channel (--channel position 1)
  4. positional: ASC channel N → the N-th opened channel (if N is within the opened list)
  5. 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.

Terminal window
# 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 it
bmcli 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):

  1. --ignore-timestamp → back-to-back, no delay
  2. --msg-delay=<ms> → fixed delay between every frame
  3. 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.

Terminal window
bmcli replay stop

In standalone mode, use Ctrl+C.

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 via BM_GetReplay.

Optional --channel=<spec> filters to the matching entity.



Source of truth: bmcli_reference.md in the BMCLI repository. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.