CAN_PLAYER(1)

πŸ“¦
version 4.6.1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

can_player β€” replay CAN traffic πŸ’–

And yes bestie, this is a section 1 user command, aka it lives in your terminal, aka it's giving main character energy. 🫢


✨ DESCRIPTION ✨

Okay so real talk: can_player is the replay girlie of the CAN universe. You logged some traffic, now you wanna play it back? Say less. It does that. 🌈

Here's the synopsis, exactly as written, don't @ me:

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. That's it, that's the whole vibe. πŸš—βœ¨

πŸŽ€ options πŸŽ€

  • -h, --help β€” pops up this help message and then dips. πŸ‘‹

πŸ¦‹ Player arguments πŸ¦‹

  • -f, --file_name LOG_FILE β€” the path and base log filename. Wanna know which types are supported? Go look at can.LogReader, bestie. πŸ“‚
  • -v β€” also prints can frames to stdout. Stack a few of these together to unlock debugging mode. Yes, you can add several. Go off. πŸ”₯
  • --ignore-timestamps β€” throws the timestamps in the bin and sends every single frame immediately, with the minimum gap between frames. (Timestamps? Never heard of her.) πŸ’€
  • --error-frames β€” also sends error frames to the interface. Drama included, no extra charge. 😭
  • -g, --gap GAP β€” <s> minimum time between replayed frames. Give the frames some personal space. 🫧
  • -s, --skip SKIP β€” <s> skips any gaps greater than 's' seconds. Bye bye long pauses. βœ‚οΈ
  • input-file β€” the file you wanna replay. For the supported types, see can.LogReader again (she's the plug, iykyk). πŸ“Ό
  • extra_args β€” everything left over gets 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. Leftovers but make it useful. πŸ“

🚌 bus arguments 🚌

  • -c, --channel CHANNEL β€” most backend interfaces need some kind of channel, ngl. For example, with the serial interface the channel might be a rfcomm device: "/dev/rfcomm0". And with the socketcan interface, valid channel examples include: "can0", "vcan0". Pick your fighter. πŸŽ€
  • -i, --interface {canalystii,cantact,etas,gs_usb,iscan,ixxat,kvaser,neousys,neovi,nican,nixnet,pcan,robotell,seeedstudio,serial,slcan,socketcan,socketcand,systec,udp_multicast,usb2can,vector,virtual} β€” specifies which backend CAN interface to use. If you leave it blank, it falls back to reading from configuration files. (A whole alphabet of options, she contains multitudes. πŸ‘‘)
  • -b, --bitrate BITRATE β€” the bitrate to use for the CAN bus. ⚑
  • --fd β€” activates CAN-FD support. FD girlies rise. πŸ¦‹
  • --data-bitrate DATA_BITRATE β€” the bitrate for the data phase when we're in CAN-FD mode. 🏎️
  • --timing TIMING_ARG [TIMING_ARG ...] β€” 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. And go check the pythoncan documentation to verify whether your CAN interface even supports the timing argument β€” fr fr, check first. πŸ”
  • --bus-kwargs BUS_KWARG [BUS_KWARG ...] β€” passes 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). Passing the vibes straight through. πŸ’…
Heads up bestie: that last example literally writes --buskwargs, while the option itself is --bus-kwargs. I'm just the messenger, I do not make the rules. πŸ™ˆ

That's the whole page, you ate it, no crumbs. πŸ’œ

This little masterpiece is can_player 4.6.1, dated October 2025, and it's a CAN_PLAYER(1) situation β€” so go replay some traffic and slay, periodt. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from