linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Cc: H.Engblom@tele-radio.com
Subject: Fwd: can-utils at http://gitorious.org/+linux-can-developers/linux-can/can-utils
Date: Fri, 15 Feb 2013 11:44:00 +0100	[thread overview]
Message-ID: <511E1170.6040409@pengutronix.de> (raw)
In-Reply-To: <7073D121A5DFE9448648C0E083BEA9C96C7AA63220@vsrv6.tele-radio.ad>

[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]

Hey Håkan,

let's wait for Oliver to say something to the length. As far as I know
the canutils already support can-fd, which can send up to 64 bytes. I
don't know the standard for sure, but maybe they got rid of the RTR in
canfd.

Regarding the mailinglist, it's linux-can@vger.kernel.org (Cc'ed), but
that only accepts text (i.e. non HTML) emails.

regards, Marc

-------- Original Message --------
Subject: 	can-utils at
http://gitorious.org/+linux-can-developers/linux-can/can-utils
Date: 	Fri, 15 Feb 2013 11:07:29 +0100
From: 	Håkan Engblom <H.Engblom@tele-radio.com>
To: 	socketcan@hartkopp.net <socketcan@hartkopp.net>, wg@grandegger.com
<wg@grandegger.com>, mkl@pengutronix.de <mkl@pengutronix.de>,
urs@isnogud.escape.de <urs@isnogud.escape.de>



Hi,



Don’t know if it is OK to write to you directly, but I could not find
any mailing-list or anything else.



Anyway, I think I found a small bug in cansend, when sedning Remote
Frames. The syntax is (an example):



$ cansend can0 181#R



But according to the standard, the dlc field should be set to how much
data that is expected in the expected tpdo. So I did the change in the
attached patch, and the syntax now is



$ cansend can0 181#R8



to indicate that 8 bytes of process data is expected.



If you agree with the fix it would be nice to have it merged. The patch
is done with commit id 50775159276d896d8b3102b6dbc658a91a2a1d53 as base,
but I’ve checked in the latest lib.c in the master branch, and the code
looks the same there.



Br Håkan Engblom, Software designer, Tele-Radio AB



diff -ur a/lib.c b/lib.c

--- a/lib.c     2013-02-15 11:01:27.308944607 +0100

+++ b/lib.c     2013-02-15 11:04:25.104942729 +0100

@@ -141,6 +141,9 @@

        if((cs[idx] == 'R') || (cs[idx] == 'r')){ /* RTR frame */

                cf->can_id |= CAN_RTR_FLAG;

+               if ((tmp = asc2nibble(cs[++idx])) > 0x08) /* 8 is max dlc */

+                       return 1;

+               cf->can_dlc = tmp;

                return 0;

        }


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

       reply	other threads:[~2013-02-15 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7073D121A5DFE9448648C0E083BEA9C96C7AA63220@vsrv6.tele-radio.ad>
2013-02-15 10:44 ` Marc Kleine-Budde [this message]
2013-02-15 10:51   ` can-utils at http://gitorious.org/+linux-can-developers/linux-can/can-utils Yegor Yefremov
2013-02-15 16:13   ` Fwd: " Oliver Hartkopp
2013-02-15 16:49     ` SV: " Håkan Engblom
2013-02-15 17:20       ` Oliver Hartkopp
2013-02-15 18:43         ` Oliver Hartkopp
2013-02-18  9:21         ` SV: " Håkan Engblom
2013-02-18 22:03           ` Oliver Hartkopp
2013-02-17 13:00   ` Heinz-Jürgen Oertel

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=511E1170.6040409@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=H.Engblom@tele-radio.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).