3

I am going to try to explain our scenario briefly.

We want to setup a simulation environment for our system running on Ubuntu so that we can use it together with our Windows based simulation tool suite. Currently we are running Ubuntu in a virtual machine using VirtualBox on a Windows host. In Ubuntu we use SocketCAN and we would like to continue to do so but instead of using real CAN hardware somehow setup CAN communication over Ethernet to the Windows host.

I am new to CAN on Linux but I have been reading about SocketCAN and was wondering if we could use virtual can (vcan) somehow?

I appreciate any help clarifying if, and if so, how SocketCAN over Ethernet could be achieved.

dbostream
  • 781
  • 2
  • 11
  • 27

1 Answers1

2

You can use socketcand. This is a daemon, that is running on the host, where you have you CAN interface (vcan or real can). The only thing you need to implement is the TCP based API in your Windows software.

yegorich
  • 4,653
  • 3
  • 31
  • 37
  • Our simulation suite already has a TCP interface for CAN communication so hopefully it won't be too much trouble setting this up. Thank you for the tip, socketcand looks very interesting. – dbostream Apr 04 '14 at 07:19
  • 1
    I created a _vcan_ interface, built and started the _socketcand_ daemon on the Ubuntu vm and finally installed [Kayak](http://kayak.2codeornot2code.org/) on Windows. CAN messages sent using _cansend_ from Ubuntu now show up in Kayak. – dbostream Apr 04 '14 at 11:42