dschanoeh / socketcand

A deprecated fork of socketcand. Please got to linux-can for the latest version.
https://github.com/linux-can/socketcand
131 stars 40 forks source link

Help output not useful #17

Closed anthonygclark closed 7 years ago

anthonygclark commented 7 years ago

dschanoeh,

The help for socketcand doesn't really describe how it works or the basic usage pattern. Do both ends of the can bus (real or virtual) spawn a socketcand instance? Can you provide a simple end-to-end example with two vcan interfaces?

My goal is to use socketcand to proxy a can/vcan device over ethernet.

Here is what I'm trying:

$ ./socketcand -i vcan0 -v -l lo -p 12345 &
$ nc 127.0.0.1 12345
< hi >< open vcan0 >
< ok >< rawmode >
$ cangen vcan0 &
$ tcpdump -nni lo udp

Should I be seeing traffic on lo? I'm seeing a bunch of output in the socketcand window, but obviously no traffic on my network interface.

Any help is appreciated!

dschanoeh commented 7 years ago

Hi @anthonygclark, this use case cannot be achieved with socketcand as it stands. It is intended to allow remote connections for Kayak (a bus analysis tool). A bridging scenario is not supported. I think you may have to find an alternative. Maybe the socketCAN command line tools can help. For example a combination of candump and cansend over an SSH connection...

anthonygclark commented 7 years ago

Thanks for the reply @dschanoeh , I really appreciate it. In case anyone else comes here, cannelloni is not a bad tool for bridging CAN over IP.