Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
C Shell
branch: master

version bump to 0.4.2 - now supports proper Debian packaging

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
latest commit 8339e62a6b
Oliver Hartkopp hartkopp authored
Failed to load latest commit information.
doc doc: fixed copy/paste typo tx_id -> rx_id
etc using interface name instead of ip adress
include/linux socketcand: add local CAN includes
init.d updated init script
rc.d better control about make install behaviour (needed for packaging)
.gitignore Added missing files to distclean target and .gitignore
Makefile.in remove automake cache and debian package when performing distclean
README.md remove the configure file which is generated by autoconf
beacon.c unify indention to use standard Linux style
beacon.h moved beacon generation to new file
config.h.in added autoconf support
configure.ac version bump to 0.4.2 - now supports proper Debian packaging
debian_pack.in fixed debian_pack.in
socketcand.1 changed default port
socketcand.c Add isotp support
socketcand.h improve ISOTPLEN usage
socketcandcl.c update mailing list address
state_bcm.c killed a wild copy/paste hell to check for extended CAN IDs
state_control.c unify indention to use standard Linux style
state_isotp.c isotp: added missing check for EFF CAN IDs
state_raw.c killed a wild copy/paste hell to check for extended CAN IDs
statistics.c unify indention to use standard Linux style
statistics.h unify indention to use standard Linux style

README.md

socketcand

Socketcand is a daemon that provides access to CAN interfaces on a machine via a network interface. The communication protocol uses a TCP/IP connection and a specific protocol to transfer CAN frames and control commands. The protocol specification can be found in ./doc/protocol.md.

Installation

To build and run socketcand make sure you have the following tools installed:

  • autoconf
  • make
  • gcc or another C compiler
  • a kernel that includes the SocketCAN modules
  • the headers for your kernel version
  • the libconfig with headers (libconfig-dev under debian based systems)

First run

$ autoconf

to create the 'configure' script.

Then run the created script with

$ ./configure

to check your system and create the Makefile. If you want to install scripts for a init system other than SysVinit check the available settings with './configure -h'. To compile and install the socketcand run

$ make
$ make install

Service discovery

The daemon uses a simple UDP beacon mechanism for service discovery. A beacon containing the service name, type and address is sent to the broadcast address (port 42000) at minimum every 3 seconds. A client only has to listen for messages of this type to detect all SocketCAN daemons in the local network.

Usage

socketcand [-v | --verbose] [-i interfaces | --interfaces interfaces] [-p port | --port port] [-l ip_addr | --listen interface] [-h | --help]

Description of the options

  • -v activates verbose output to STDOUT
  • -i interfaces is used to specify the SocketCAN interfaces the daemon shall provide access to
  • -p port changes the default port (29536) the daemon is listening at
  • -l interface changes the default network interface (eth0) the daemon will bind to
  • -h prints a help message
Something went wrong with that request. Please try again.