All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	"Max S." <king@greatfreeworld.org>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [Socketcan-users] socketcan in barebox bootloader
Date: Fri, 10 Feb 2012 10:33:41 +0100	[thread overview]
Message-ID: <4F34E475.1090408@hartkopp.net> (raw)
In-Reply-To: <4F34DB82.2050603@pengutronix.de>

On 10.02.2012 09:55, Marc Kleine-Budde wrote:

> Now with linux-can on Cc :)
> 
> On 02/09/2012 10:57 PM, Max S. wrote:
>> CAN is meant for control messages, not for media, or data transfer.
> 
> In the automotive world it's quite common to do firmware updates over CAN.


Hi,

indeed e.g. the ISO 15765-2 protocol is used to segment PDUs up to 4095 byte
into the 8 byte payload of CAN frames.

If you want to play with ISO TP on SocketCAN - it's located here:

https://gitorious.org/linux-can/can-modules/blobs/master/net/can/isotp.c

But then you would need to implement ISO-TP inside the bootloader too.

>> That aside, I do use CAN to flash AVR microchips. It can take a few
>> minutes though.
> 
> What throughput do you usually get when updating over CAN?


I implemented a IP-over-ISOTP tunnel for fun:

https://gitorious.org/linux-can/can-utils/blobs/master/isotptun.c

and taking into account that ISO-TP uses the first byte inside the CAN frame
payload for protocol purposes (1/8 = 12.5% overhead) and the TCP/IP-header of
40 byte within the IP communication i got ~26 kByte/s on a 500kbit/s CAN as
throughput.

Probably that helps to get an impression ;-)

Regards,
Oliver


  reply	other threads:[~2012-02-10  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF32B6D01B.4E8430B8-ONC125799E.0055E20B-C125799E.00563FFD@o0802.rafi.inhouse>
     [not found] ` <4F3372C3.3040902@grandegger.com>
     [not found]   ` <OF323BE753.A56A00D8-ONC125799F.002F6CA3-C125799F.00302BFA@o0802.rafi.inhouse>
2012-02-09  9:32     ` Antwort: Re: [Socketcan-users] socketcan in barebox bootloader Wolfgang Grandegger
2012-02-09  9:50       ` Marc Kleine-Budde
     [not found] ` <1328824647.5414.10.camel@slaptop>
2012-02-10  8:55   ` Marc Kleine-Budde
2012-02-10  9:33     ` Oliver Hartkopp [this message]
2012-02-10 10:58       ` Marc Kleine-Budde

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=4F34E475.1090408@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=king@greatfreeworld.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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 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.