socketcand
socketcand copied to clipboard
connect two socketcand
Hi,
I start thinking if there is possibility and anyone think about connecting two devices with socketcand?
I wonder if there is possibility to get something like can <-> eth <-> eth <-> can
Not in the scope of socketcand currently, but you can easily use python-can on the other end to connect to the remote and proxy the traffic to/from any other local interface, for example a socketcan virtual interface
The socketcand was intended for interactive control of CAN data from a host that wants to access CAN interfaces remotely.
A more efficient SocketCAN tunneling is provided by the https://github.com/mguentner/cannelloni project.
If your only use case is to see CAN traffic from another Linux host, e.g. on your local virtual CAN interfaces, you can get this traffic via ssh command option like this:
ssh root@remote-host candump -L can0 can1 | canplayer vcan0=can0 vcan1=can1
or e.g. create a CAN logfile on your local host with remove traffic:
ssh root@remote-host candump -L any > remote-candump.log