Skip to content

BMCLI message

Send CAN/CAN FD or LIN messages. --type selects CAN data/remote or LIN master-write/master-read/sync-break. CAN supports raw data, repeated sends, and DBC signal encoding. LIN supports IDs 0x00..0x3F and payloads up to 8 bytes.

Terminal window
# Single standard CAN frame
bmcli message send --channel=0 --message=0x123 --data="AA BB CC"
# CAN FD with bitrate switching
bmcli message send --channel=0 --message=0x100 --data="11 22" --flags=fdf+brs
# Extended ID (29-bit)
bmcli message send --channel=0 --message=0x18FEDC01 --flags=ide --data="01 02"
# Batch: 100 frames at 10ms interval (software-timed, blocks until done)
bmcli message send --channel=0 --message=0x100 --count=100 --cycle=10
# DBC signal encoding (uses globally loaded DBC, see `database load`)
bmcli message send --channel=0 --message=EngineStatus --signal=EngineSpeed:1500
# Multiple signals
bmcli message send --channel=0 --message=EngineStatus --signal=EngineSpeed:1500 --signal=CoolantTemp:85
# LIN master publishes a data frame
bmcli message send --channel=10356/4 --id=0x20 --type=master-write --data="01 02 03 04" --bitrate=19200
# LIN master read: payload+checksum response is required
bmcli message send --channel=10356/4 --id=0x20 --type=master-read --dlc=8 --timeout=500 --format=json
# LIN sync break: a slave payload response is an error
bmcli message send --channel=10356/4 --id=0x21 --type=sync-break --timeout=500 --format=json

--signal format — all of the following are accepted (separator interchangeable):

Syntax Example
--signal=Name=Value --signal=EngineSpeed=1500
--signal=Name:Value --signal=EngineSpeed:1500
--signal Name=Value --signal EngineSpeed=1500
--signal Name:Value --signal EngineSpeed:1500

Repeat --signal for multiple signals. No spaces inside signal values.

Option Default Description
--channel (required) CAN or LIN channel; bus is inferred from capability
--message / --id (required) CAN ID/DBC message name, or LIN frame ID 0x00..0x3F
--data all zeros Payload hex bytes; LIN supports up to 8 and forbids data with header-only operations
--type CAN data; LIN master-write CAN: data, remote. LIN: master-write, master-read, sync-break
--dlc auto; LIN master-read 8 CAN DLC or expected LIN response length 0..8; sync-break uses 0
--flags DBC metadata or none CAN only: ide, fdf, brs, rtr (plus-separated)
--checksum auto LIN only: auto, classic, or enhanced
--count 1 Number of frames (software-timed loop)
--cycle 0 Interval between frames in ms
--timeout standalone 0; daemon 100 CAN write/ACK timeout, or LIN operation completion deadline, in ms
--signal CAN only: repeatable DBC signal assignment
--bitrate LIN 19200 Standalone LIN bitrate; daemon channels keep their open-time configuration

--count/--cycle vs txtask: message send --count --cycle is a synchronous software-timed loop that blocks the command until all frames are sent. txtask add is an asynchronous hardware-timed task running on the device firmware — more precise, non-blocking, and persistent. Use message send for one-off batch tests; use txtask for long-running periodic messages.

For LIN header operations, sent counts submitted headers and completed counts outcomes that matched the selected intent. Each JSON results item has an outcome. Master-read succeeds only with the expected DLC, payload/checksum, and no LIN errors. Sync-break succeeds only for a header-only sync_break=true event; a payload is reported as unexpected-response and returns nonzero.

Receive CAN, CAN FD, or LIN frames. Blocks until --count is reached or --duration elapses (or Ctrl+C in standalone). Standalone capture accepts multiple channels only when they have the same bus type.

In daemon mode, omitting --channel receives from ALL open channels simultaneously. In standalone mode, --channel is required.

Terminal window
# Standalone: single channel, exit after 100 frames
bmcli message recv --channel=10356/1 --count=100
# Standalone: multi-channel, 5-second capture
bmcli message recv --channel=10356/0,10356/1 --duration=5
# Daemon: receive from all open channels for 10 seconds
bmcli message recv --duration=10
# With CAN ID filter
bmcli message recv --channel=10356/1 --id=0x100 --mask=0x7FF --duration=5
# Passive LIN capture
bmcli message recv --channel=10357/4 --mode=listen-only --bitrate=19200 --duration=5 --format=jsonl
Option Default Description
--channel daemon: all open; standalone: required Channel(s): SN/port, comma-separated list, or omit for all open (daemon only)
--count 0 (infinite) Max messages to receive
--duration 0 (infinite, Ctrl+C to stop) Wall-clock capture duration in seconds. Daemon mode defaults to 10s if neither count nor duration is given.
--id none CAN or LIN ID filter (software-filtered)
--mask 0x7FF ID filter mask
--format text text, json (array), jsonl (one JSON per line), csv
--bitrate LIN 19200 Standalone bus timing; CAN also accepts a nominal/data pair
--mode LIN listen-only Standalone LIN role

Note: message send uses --timeout (ms, ACK wait); message recv uses --duration (seconds, capture window). Different parameters, different units, different semantics.



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.