Linux-CAN / SocketCAN user space applications
 
 
 
 
Go to file
Oliver Hartkopp 7729c046c5 cangen: support ESI bit for CAN FD frame generation
The CAN FD frames support BTR and ESI as special flags. While BTR could
be generated by cangen the ESI bit could not be generated so far.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2020-05-10 12:03:35 +02:00
.github/workflows add github actions 2019-11-25 15:29:47 +01:00
LICENSES Add license texts as files 2019-09-26 15:45:43 +02:00
cmake CMake first pass (#90) 2018-08-17 09:50:30 +02:00
config/m4 add autotools infrastructure 2010-04-19 12:12:18 +00:00
include/linux include: import header files from kernel v5.4-rc7 2019-11-12 08:59:58 +01:00
.gitignore Rename j* to j1939\1 2020-04-20 10:18:13 +03:00
.travis.yml CI: treat gcc warning as errors 2018-09-13 10:38:19 +02:00
Android.mk can-utils: added isotpperf tool for performance measurements 2015-02-04 10:17:38 +01:00
CMakeLists.txt Rename j* to j1939\1 2020-04-20 10:18:13 +03:00
GNUmakefile.am Rename j* to j1939\1 2020-04-20 10:18:13 +03:00
Makefile Rename j* to j1939\1 2020-04-20 10:18:13 +03:00
README.md Fix spelling in various files 2019-11-11 14:21:49 +01:00
asc2log.c asc2log: add sanity checks for search pattern 2020-05-10 10:44:11 +02:00
autogen.sh do not use --symlink for autoreconf 2014-07-02 16:03:34 +02:00
bcmserver.c Fix spelling in various files 2019-11-11 14:21:49 +01:00
can-calc-bit-timing.c can-utils: fix missing include of libgen.h 2020-04-28 19:14:52 +02:00
can-j1939-kickstart.md can-j1939-kickstart: remove "Use source address" example 2019-12-02 08:29:45 +01:00
can-j1939.md Fix spelling in various files 2019-11-11 14:21:49 +01:00
canbusload.c canbusload.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:08 +03:00
candump.c candump: fix/unify help text indention 2020-04-28 18:59:37 +02:00
canfdtest.c canfdtest.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:08 +03:00
canframelen.c Add SPDX identifiers 2019-06-19 12:24:24 +02:00
canframelen.h Add SPDX identifiers 2019-06-19 12:24:24 +02:00
cangen.c cangen: support ESI bit for CAN FD frame generation 2020-05-10 12:03:35 +02:00
cangw.c cangw: make help text fit into 80 colums again 2020-04-28 19:01:07 +02:00
canlogserver.c canlogserver.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:08 +03:00
canplayer.c canplayer: make help text fit into 80 colums again 2020-04-28 19:01:45 +02:00
cansend.c cansend: simplify tool decription in help text 2020-04-27 10:53:02 +02:00
cansniffer.c cansniffer: fix buffer length in readsettings() 2020-05-07 18:49:20 +02:00
configure.ac buildsystem: add SCM_TIMESTAMPING_OPT_STATS if not already defined 2019-05-09 14:40:16 +02:00
isotpdump.c isotpdump: make help text fit into 80 colums again 2020-04-28 18:57:26 +02:00
isotpperf.c isotpperf.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
isotprecv.c isotprecv.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
isotpsend.c isotpsend.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
isotpserver.c isotpserver.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
isotpsniffer.c isotpsniffer.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
isotptun.c isotptun.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
j1939acd.c jacd.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
j1939cat.c jcat.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
j1939spy.c jspy.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
j1939sr.c jsr.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
lib.c Add SPDX identifiers 2019-06-19 12:24:24 +02:00
lib.h Fix spelling in various files 2019-11-11 14:21:49 +01:00
libj1939.c libj1939: fix missing include and syntax 2019-11-12 10:04:24 +01:00
libj1939.h libj1939.h: add missing license and copyright header 2019-09-26 15:46:20 +02:00
log2asc.c log2asc: support DLC values in Classic CAN RTR frames 2020-05-10 11:45:03 +02:00
log2long.c Add SPDX identifiers 2019-06-19 12:24:24 +02:00
page.theme import sample program & help page 2013-11-20 11:14:44 +01:00
slcan_attach.c slcan_attach.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
slcand.c slcand.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00
slcanpty.c can-utils: fix missing include of libgen.h 2020-04-28 19:14:52 +02:00
style.css import sample program & help page 2013-11-20 11:14:44 +01:00
terminal.h Add SPDX identifiers 2019-06-19 12:24:24 +02:00
testj1939.c testj1939.c: Reformat help/usage output to be compatible with help2man. 2020-04-27 08:20:09 +03:00

README.md

SocketCAN logo

SocketCAN userspace utilities and tools

This repository contains some userspace utilities for Linux CAN subsystem (aka SocketCAN):

Basic tools to display, record, generate and replay CAN traffic

  • candump : display, filter and log CAN data to files
  • canplayer : replay CAN logfiles
  • cansend : send a single frame
  • cangen : generate (random) CAN traffic
  • cansniffer : display CAN data content differences (just 11bit CAN IDs)

CAN access via IP sockets

  • canlogserver : log CAN frames from a remote/local host
  • bcmserver : interactive BCM configuration (remote/local)
  • socketcand : use RAW/BCM/ISO-TP sockets via TCP/IP sockets
  • cannelloni : UDP/SCTP based SocketCAN tunnel

CAN in-kernel gateway configuration

  • cangw : CAN gateway userspace tool for netlink configuration

CAN bus measurement and testing

  • canbusload : calculate and display the CAN busload
  • can-calc-bit-timing : userspace version of in-kernel bitrate calculation
  • canfdtest : Full-duplex test program (DUT and host part)

ISO-TP tools ISO15765-2:2016 for Linux

  • isotpsend : send a single ISO-TP PDU
  • isotprecv : receive ISO-TP PDU(s)
  • isotpsniffer : 'wiretap' ISO-TP PDU(s)
  • isotpdump : 'wiretap' and interpret CAN messages (CAN_RAW)
  • isotpserver : IP server for simple TCP/IP <-> ISO 15765-2 bridging (ASCII HEX)
  • isotpperf : ISO15765-2 protocol performance visualisation
  • isotptun : create a bi-directional IP tunnel on CAN via ISO-TP

Log file converters

  • asc2log : convert ASC logfile to compact CAN frame logfile
  • log2asc : convert compact CAN frame logfile to ASC logfile
  • log2long : convert compact CAN frame representation into user readable

Serial Line Discipline configuration (for slcan driver)

  • slcan_attach : userspace tool for serial line CAN interface configuration
  • slcand : daemon for serial line CAN interface configuration
  • slcanpty : creates a pty for applications using the slcan ASCII protocol

CMake Project Generator

  • Place your build folder anywhere, passing CMake the path. Relative or absolute.
  • Some examples using a build folder under the source tree root:
  • Android : cmake -DCMAKE_TOOLCHAIN_FILE=~/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-21 -DANDROID_ABI=armeabi-v7a .. && make
  • Android Studio : Copy repo under your project's app folder, add add_subdirectory(can-utils) to your CMakeLists.txt file after cmake_minimum_required(). Generating project will build Debug/Release for all supported EABI types. ie. arm64-v8a, armeabi-v7a, x86, x86_64.
  • Raspberry Pi : cmake -DCMAKE_TOOLCHAIN_FILE=~/rpi/tools/build/cmake/rpi.toolchain.cmake .. && make
  • Linux : cmake -GNinja .. && ninja
  • Linux Eclipse Photon (Debug) : CC=clang cmake -G"Eclipse CDT4 - Unix Makefiles" ../can-utils/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_VERSION=4.8.0
  • To override the base installation directory use: CMAKE_INSTALL_PREFIX ie. CC=clang cmake -DCMAKE_INSTALL_PREFIX=./out .. && make install

Additional Information: