Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SocketCAN over Ethernet

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.

like image 466
dbostream Avatar asked Feb 20 '26 17:02

dbostream


1 Answers

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.

like image 74
yegorich Avatar answered Feb 23 '26 12:02

yegorich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!