Fwd: CanBus2Ethernet Bridge
From: Mirza Krak <hidden>
Date: 2017-05-08 09:47:28
Possibly related (same subject, not in this thread)
- 2017-05-08 · CanBus2Ethernet Bridge · gianluca <hidden>
---------- Forwarded message ---------- From: Mirza Krak <redacted> Date: 2017-05-08 11:45 GMT+02:00 Subject: Re: CanBus2Ethernet Bridge To: gianluca <redacted> Cc: "linux-can@vger.kernel.org" <redacted> 2017-05-08 11:31 GMT+02:00 gianluca [off-list ref]:
Hello list! I am looking for a simple bridge who collect canbus packets over a socketcan device (i.e. can0) and send them to a socket device (i.e. a network socket). I have a embedded board who run Linux Debian with CanBus (i.MX6 with FlexCan) and I would like to send/receive those messages to a "server" who is listening on the network socket and "translate" them to can frames to an existing can device (i.e. vcan0 or a real can0 device). Because on the "server" there is an application software who is using the socketcan device to exchange data and such. I was thinking about socketcand daemon but to my knowledge has a few limitiations: 1- It uses the REAL socketcan device as accessing device (-i option [vcan0,can1] ...) 2- It uses the interface to bind to, and NOT the address to send the packets to (-l). I would like to have something like this on the embedded (it does not work actually!!): (iMX6 IP: 192.168.1.101) # socketcand -i can0 -l 192.168.1.100 and on the server (192.168.1.100): # socketcand -i vcan0 -l 192.168.1.101 In this way every packet sent from the application to the vcan0 can be routed through the ethernet to the iMX6 @ address 192.168.1.101 and every packet received from the real canbus CAN0 on the iMX6 can be routed to the server 192.168.1.100 to the vcan0 interface. There is such possibility without writing a bridge from scratch???
(re-send, first attempt had HTML parts) There is an project that I believe does what you are after. Take a look at [1]. [1]. https://github.com/mguentner/cannelloni -- Best Regards Mirza