CAN_BRIDGE(1)

πŸ“¦ version 4.6.1, in ubuntu resolute, ubuntu stonking

✨ CAN_BRIDGE(1) ✨

okay bestie, pull up a chair 🫢 this is can_bridge, living in section 1 (User Commands) of the manual, and it is exactly the glow-up your two lonely CAN buses have been waiting for. no cap.


πŸ’– NAME πŸ’–

can_bridge β€” bridge two CAN buses πŸŒ‰


πŸ¦‹ DESCRIPTION πŸ¦‹

here's the whole vibe, in one block. this is the usage, verbatim, so don't come for me about the line breaks:

usage: can_bridge [-h] [--bus1-channel CHANNEL]
       [--bus1-interface INTERFACE] [--bus1-bitrate BITRATE] [--bus1-fd]
       [--bus1-data-bitrate DATA_BITRATE] [--bus1-timing TIMING_ARG
       [TIMING_ARG ...]]  [--bus1-bus-kwargs BUS_KWARG [BUS_KWARG ...]]
       [--bus2-channel CHANNEL] [--bus2-interface INTERFACE]
       [--bus2-bitrate BITRATE] [--bus2-fd] [--bus2-data-bitrate
       DATA_BITRATE] [--bus2-timing TIMING_ARG [TIMING_ARG ...]]
       [--bus2-bus-kwargs BUS_KWARG [BUS_KWARG ...]]

so what does it actually do, bestie? it bridges two CAN buses. that's the whole job and it does it flawlessly. both buses get connected to each other, so messages from bus1 get sent on bus2, and messages from bus2 get sent to bus1. bidirectional. mutual. it's giving ✨*relationship goals*✨. periodt.


🌸 OPTIONS 🌸

πŸŽ€ options:

  • -h, --help β€” show this help message and exit. the classic. the icon. when in doubt, ask for help and dip. πŸ’…

πŸ‘‘ Bus 1 arguments:

  • --bus1-channel CHANNEL β€” most backend interfaces need some kind of channel, fr fr. like 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. 🌈
  • --bus1-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} β€” specify the backend CAN interface to use. if you leave it blank, it falls back to reading from configuration files. the full menu, no substitutions:
    • 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
  • --bus1-bitrate BITRATE β€” bitrate to use for the CAN bus. that's it, that's the tweet. ⭐
  • --bus1-fd β€” activate CAN-FD support. go faster, babe. πŸ”₯
  • --bus1-data-bitrate DATA_BITRATE β€” bitrate to use for the data phase in case of CAN-FD. (only matters when you're in your FD era.) πŸ¦‹
  • --bus1-timing TIMING_ARG [TIMING_ARG ...] β€” configure bit rate and bit timing. for example, use this for classical CAN:
--timing f_clock=8_000_000 tseg1=5 tseg2=2 sjw=2 brp=2 nof_samples=1

or this for CAN FD:

--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
heads up bestie: check the pythoncan documentation to verify whether your CAN interface actually supports the timing argument. don't just assume. πŸ™ˆ
  • --bus1-bus-kwargs BUS_KWARG [BUS_KWARG ...] β€” 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). yes, it really just hands them straight down. iconic behavior honestly. πŸ’œ

πŸ’œ Bus 2 arguments:

(these are the bus1 ones again but for the other bus. twin energy. no notes. πŸ‘―)

  • --bus2-channel CHANNEL β€” most backend interfaces need some kind of channel, fr fr. like with the serial interface the channel might be a rfcomm device: "/dev/rfcomm0". and with the socketcan interface, valid channel examples include: "can0", "vcan0". πŸŽ€
  • --bus2-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} β€” specify the backend CAN interface to use. if you leave it blank, it falls back to reading from configuration files. same list, second verse:
    • 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
  • --bus2-bitrate BITRATE β€” bitrate to use for the CAN bus. ⭐
  • --bus2-fd β€” activate CAN-FD support. πŸ”₯
  • --bus2-data-bitrate DATA_BITRATE β€” bitrate to use for the data phase in case of CAN-FD. πŸ¦‹
  • --bus2-timing TIMING_ARG [TIMING_ARG ...] β€” configure bit rate and bit timing. for example, use this for classical CAN:
--timing f_clock=8_000_000 tseg1=5 tseg2=2 sjw=2 brp=2 nof_samples=1

or this for CAN FD:

--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
again, bestie: check the pythoncan documentation to verify whether your CAN interface supports the timing argument. πŸ™ˆ
  • --bus2-bus-kwargs BUS_KWARG [BUS_KWARG ...] β€” 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). πŸ’œ

and that's the whole page, babe, you made it to the end πŸ₯³

this iconic little manual is can_bridge 4.6.1, dated October 2025 β€” and it's filed under CAN_BRIDGE(1). go bridge something. slay. πŸ’…βœ¨

πŸ“¦ where this page comes from