CAN_PLAYER(1)
πΈ 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 atcan.LogReader, bestie. π-vβ also prints can frames tostdout. 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, seecan.LogReaderagain (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=9passes the keyword argumentcompression_level=9to theBlfWriter. 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=1for 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=1for CAN FD. And go check the pythoncan documentation to verify whether your CAN interface even supports thetimingargument β 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=1234is equivalent to opening the bus withcan.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
- ubuntu resolute: python3-can 4.6.1-4 Β· LGPL-3.0-only
- ubuntu stonking: python3-can 4.6.1-4 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms