linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Max S." <max@schneidersoft.net>
To: "Daniel Boström" <daniel.bostrom@maximatecc.com>
Cc: linux-can@vger.kernel.org
Subject: Re: SocketCAN over Ethernet
Date: Thu, 03 Apr 2014 16:51:23 +0000	[thread overview]
Message-ID: <1396543883.12659.25.camel@blackbox> (raw)
In-Reply-To: <loom.20140403T134741-892@post.gmane.org>

Hello,

I don't know of a direct way of hooking up two socket can interfaces
over eth.

If this is just a quick fix or development crutch and not for production
you could try the following: Create a VCAN interface on both machines.
Create a simple userspace program (perhaps in C) to listen to the VCAN
interface, and transmit the frames read, via UDP (or TCP), to the other
machine. Create another program to listen to the UDP traffic and dumps
it into the VCAN interface on the other host. invert the roles and
you've got duplex.

If the arch of the two hosts is binary compatible you don't even need to
encode data.

I have done this while I was working on a display software, It allowed
me to work on the laptop on the sofa using live can data aggregated by
sensors and a server elsewhere.

Regards,
Maximilian Schneider.

On Thu, 2014-04-03 at 11:52 +0000, Daniel Boström wrote:
> Hello,
> 
> 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. If you need additional information about our 
> scenario please let me know.
> 
> Best regards
> Daniel
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2014-04-03 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 11:52 SocketCAN over Ethernet Daniel Boström
2014-04-03 16:51 ` Max S. [this message]
2014-04-04 19:17   ` Michal Sojka
2014-04-03 19:42 ` Oliver Hartkopp
2014-04-04  7:08   ` Daniel Boström
2014-04-04 11:59     ` Daniel Boström
2014-04-07 14:14       ` Daniel Boström
2014-04-08  7:21         ` Daniel Boström
2014-04-03 20:54 ` François

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396543883.12659.25.camel@blackbox \
    --to=max@schneidersoft.net \
    --cc=daniel.bostrom@maximatecc.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).