All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: [CANFD] Upgraded can-utils tools to support CAN FD for Linux 3.6
Date: Tue, 21 Aug 2012 17:41:24 +0200	[thread overview]
Message-ID: <5033AC24.1010005@hartkopp.net> (raw)

Hi all,

as the includes and the userspace API for CAN FD (raw sockets) are now
finalized in Linux 3.6-rc2 i started to work on the can-utils.

The changed tools have been pushed to a separate 'canfd' branch:

https://gitorious.org/linux-can/can-utils/commits/canfd

Feel free to test it with the latest 3.6-rc2 kernel and don't forget to set
the MTU of the vcan interface to 72 ( CANFD_MTU sizeof(struct canfd_frame) )

# ifconfig vcan0 down
# ifconfig vcan0 mtu 72 up

Especially cangen has now a '-m' (mix) option which randomly generates CAN2.0,
RTR frames and CAN FD frames - so one can see every type of CAN frames to play
with output representations, logfiles, etc.

'candump' has a new '-x' option to display extra frame information, e.g. RX/TX
information (if frames are received by the host or sent) and BRS/ESI for CAN FD.

Have fun!

Oliver


---

    canfd: upgrade tools to support CAN FD for Linux 3.6
    
    This is a major upgrade of the basic tools to handle CAN FD frames.
    The library to parse and print CAN frames and logfiles has been extended.
    
    In detail:
    
     asc2log.c      |    5 +
     candump.c      |   46 ++++++++++---
     cangen.c       |  172 ++++++++++++++++++++++++++++++++------------------
     canlogserver.c |   28 +++++---
     canplayer.c    |   25 ++++---
     cansend.c      |   55 ++++++++++++---
     lib.c          |  196 ++++++++++++++++++++++++++++++++++++++-------------------
     lib.h          |  113 ++++++++++++++++++++++++--------
     log2asc.c      |    8 +-
     log2long.c     |   26 ++++++-
     10 files changed, 471 insertions(+), 203 deletions(-)
    
    asc2log.c / log2asc.c
    - updates for new lib functions
    - still can only handle CAN2.0 frames (no new info about ASC file layout)
    
    log2long.c / canlogserver.c / canplayer.c
    - updates for new lib functions to handle CAN FD
    
    lib.h / lib.c
    - reworked lib functions to handle CAN FD
    - parse_canframe() now returns CAN_MTU and CANFD_MTU on success, 0 at failure
    - added can_dlc2len() and can_len2dlc() helpers
    - moved hexstring2candata to hexstring2data to support simple byte buffers
    - added new view CANLIB_VIEW_INDENT_SFF to fix sloppy out when mixing EFF & SFF
    - in the long CAN frame representation use %03X/%08X instead of %3X/%8X
    - introduced unified buffer size definitions for ASCII CAN frames
    - updated documentation
    
    cangen.c
    - support CAN FD frames (added -f option to create CAN FD frames)
    - added -m option ('mix') to create random extended / RTR / CAN FD frames
    - fixed the 'fixed data' option which was zero'ing the payload by the time
    - updated help text

    candump.c
    - support CAN FD frames (print, bridge, log)
    - updated layout with CANLIB_VIEW_INDENT_SFF when detecting an EFF frame
    - distinguish frame types by length info: [0] = CAN2.0 [00] = CAN FD frame
    - added -x option to print extra message infos: RX/TX BRS ESI
 
EOF

                 reply	other threads:[~2012-08-21 15:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5033AC24.1010005@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --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 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.