All of lore.kernel.org
 help / color / mirror / Atom feed
* CAN Bus over TCP/IP
@ 2014-06-14  1:55 John Whitmore
  2014-06-14  5:25 ` Yegor Yefremov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: John Whitmore @ 2014-06-14  1:55 UTC (permalink / raw)
  To: linux-can

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CAN Bus over TCP/IP
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Yegor Yefremov @ 2014-06-14  5:25 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-can@vger.kernel.org

On Sat, Jun 14, 2014 at 3:55 AM, John Whitmore <arigead@gmail.com> 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.

Take a look at this project: https://github.com/dschanoeh/socketcand

Another variant were to extend slcanpty to accept TCP connections.

Yegor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CAN Bus over TCP/IP
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan May @ 2014-06-18  8:52 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-can

A very simple solution using a messaging broker is this one:

  https://github.com/smay4finger/MQTT2CAN

Beware, it's not real-time capable and was not developed with network
security in mind.

mfg, Stefan.

On Sa, 2014-06-14 at 02:55 +0100, 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CAN Bus over TCP/IP
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Andre Naujoks @ 2014-06-18 21:02 UTC (permalink / raw)
  To: John Whitmore, linux-can

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-18 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.