Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Merge pull request #9 from yegorich/install

Remove cp -n which might not exist on old system and rely on install ins...
latest commit 274e4e4410
Jan-Niklas Meier authored January 16, 2014
Octocat-spinner-32 doc Merge of @flxo's socketcand client March 24, 2012
Octocat-spinner-32 etc using interface name instead of ip adress September 28, 2011
Octocat-spinner-32 init.d updated init script October 07, 2011
Octocat-spinner-32 rc.d better control about make install behaviour (needed for packaging) May 11, 2011
Octocat-spinner-32 .gitignore updated .gitignore August 31, 2011
Octocat-spinner-32 Makefile.in Remove cp -n which might not exist on old system and rely on install … January 15, 2014
Octocat-spinner-32 README.md Update README.md December 18, 2013
Octocat-spinner-32 beacon.c fixed connect September 28, 2011
Octocat-spinner-32 beacon.h moved beacon generation to new file November 22, 2010
Octocat-spinner-32 config.h.in added autoconf support August 25, 2011
Octocat-spinner-32 configure Version bump November 04, 2012
Octocat-spinner-32 configure.ac Version bump November 04, 2012
Octocat-spinner-32 debian_pack.in patches by @nautsch for debian packaging and build process cleanup February 05, 2012
Octocat-spinner-32 socketcand.1 changed default port January 19, 2012
Octocat-spinner-32 socketcand.c Use PORT macro in print_usage July 25, 2013
Octocat-spinner-32 socketcand.h changed default port January 19, 2012
Octocat-spinner-32 socketcandcl.c Use PORT macro in print_usage July 25, 2013
Octocat-spinner-32 state_bcm.c fixed extended frame detection November 04, 2011
Octocat-spinner-32 state_bcm.h sanitized frame transmission in bcm mode February 25, 2011
Octocat-spinner-32 state_control.c changed statistics behaviour August 30, 2011
Octocat-spinner-32 state_control.h new mode state_control April 15, 2011
Octocat-spinner-32 state_raw.c state_raw: fix command buffer handling January 09, 2014
Octocat-spinner-32 state_raw.h moved states to different files January 26, 2011
Octocat-spinner-32 statistics.c fixed statistic parsing August 30, 2011
Octocat-spinner-32 statistics.h changed statistics behaviour August 30, 2011
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:

  • 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

$ ./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.