Scroll to navigation

CAN_PLAYER(1) User Commands CAN_PLAYER(1)

NAME

can_player - replay CAN traffic

DESCRIPTION

usage: can_player [-h] [-f LOG_FILE] [-v] [--ignore-timestamps]

[--error-frames] [-g GAP] [-s SKIP] [-c CHANNEL] [-i INTERFACE] [-b BITRATE] [--fd] [--data-bitrate DATA_BITRATE] [--timing TIMING_ARG [TIMING_ARG ...]] [--bus-kwargs BUS_KWARG [BUS_KWARG ...]] input-file ...

Replay CAN traffic.

options:

show this help message and exit

Player arguments:

Path and base log filename, for supported types see can.LogReader.
Also print can frames to stdout. You can add several of these to enable debugging
Ignore timestamps (send all frames immediately with minimum gap between frames)
Also send error frames to the interface.
<s> minimum time between replayed frames
<s> skip gaps greater than 's' seconds
The file to replay. For supported types see can.LogReader.
The remaining arguments will be used for logger/player initialisation. For example, `can_logger -i virtual -c test -f logfile.blf --compression-level=9` passes the keyword argument `compression_level=9` to the BlfWriter.

bus arguments:

Most backend interfaces require some sort of channel. For example with the serial interface the channel might be a rfcomm device: "/dev/rfcomm0". With the socketcan interface valid channel examples include: "can0", "vcan0".
Specify the backend CAN interface to use. If left blank, fall back to reading from configuration files.
Bitrate to use for the CAN bus.
Activate CAN-FD support
Bitrate to use for the data phase in case of CAN-FD.
Configure bit rate and bit timing. For example, use `--timing f_clock=8_000_000 tseg1=5 tseg2=2 sjw=2 brp=2 nof_samples=1` for classical CAN or `--timing f_clock=80_000_000 nom_tseg1=119 nom_tseg2=40 nom_sjw=40 nom_brp=1 data_tseg1=29 data_tseg2=10 data_sjw=10 data_brp=1` for CAN FD. Check the pythoncan documentation to verify whether your CAN interface supports the `timing` argument.
Pass keyword arguments down to the instantiation of the bus class. For example, `-i vector -c 1 --buskwargs app_name=MyCanApp serial=1234` is equivalent to opening the bus with `can.Bus('vector', channel=1, app_name='MyCanApp', serial=1234)
October 2025 can_player 4.6.1