From: Andre Naujoks <nautsch2@gmail.com>
To: John Whitmore <arigead@gmail.com>, linux-can@vger.kernel.org
Subject: Re: CAN Bus over TCP/IP
Date: Wed, 18 Jun 2014 23:02:54 +0200 [thread overview]
Message-ID: <53A1FE7E.3040909@gmail.com> (raw)
In-Reply-To: <20140614015522.GC9911@griso.site>
On 14.06.2014 03:55, John Whitmore wrote:
> Was contemplating something which would allow me to transmit CAN Bus frames
> over TCP/IP. Searching throws up a few papers on the subject but wondered if
> there's an OpenSource implementation already out there or any kind of spec on
> the subject. Thought there might be an RFC on the subject but haven't thrown
> up anything.
> --
> 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
>
Hi.
Have a look at slcan and the accompanying tools (slcan_attach, ...) from
can-utils in combination with socat or a simple C-implementation that
just forwards data between a pseudo-tty and a socket. I use that setup
to connect multiple virtual machines via CAN for testing purposes.
The final setup would look like this:
candev <-> ptty <-> socat <-> tcp <-> socat <-> ptty <-> candev
I don't know what kind of performance you need, but it should definitely
be worth a look.
For example:
Machine A:
socat -d -d PTY,link=/tmp/slcan,raw TCP-LISTEN:30000 &
slcan_attach /tmp/slcan
ip link set slcan0 up
Machine B:
socat TCP:<machine-A-IP>:30000 PTY,link=/tmp/slcan
slcan_attach /tmp/slcan
ip link set slcan0 up
should connect those two CAN-Busses over TCP.
Regards
Andre
prev parent reply other threads:[~2014-06-18 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 1:55 CAN Bus over TCP/IP John Whitmore
2014-06-14 5:25 ` Yegor Yefremov
2014-06-18 8:52 ` Stefan May
2014-06-18 21:02 ` Andre Naujoks [this message]
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=53A1FE7E.3040909@gmail.com \
--to=nautsch2@gmail.com \
--cc=arigead@gmail.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