CAN_BRIDGE(1)
β¨ 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:canalystiicantactetasgs_usbiscanixxatkvaserneousysneovinicannixnetpcanrobotellseeedstudioserialslcansocketcansocketcandsystecudp_multicastusb2canvectorvirtual
--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=1234is equivalent to opening the bus withcan.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:canalystiicantactetasgs_usbiscanixxatkvaserneousysneovinicannixnetpcanrobotellseeedstudioserialslcansocketcansocketcandsystecudp_multicastusb2canvectorvirtual
--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=1234is equivalent to opening the bus withcan.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
- 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