GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - linux-can/socketcand: Server to access CAN sockets over ASCII protocol

BranchesTags
Open more actions menu

Latest commit

 

History

330 Commits
330 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
LICENSES
LICENSES
 
 
debian
debian
 
 
doc
doc
 
 
files
files
 
 
include/linux
include/linux
 
 
src
src
 
 
.clang-format
.clang-format
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
meson.build
meson.build
 
 
meson_options.txt
meson_options.txt
 
 
socketcand.1
socketcand.1
 
 

Repository files navigation

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:

  • meson
  • 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)
  • the libsocketcan with headers (libsocketcan-dev under debian based systems) is a requirement to configure the interfaces from socketcand

Execute the following commands to configure, build, and install the software:

$ meson setup -Dlibconfig=true --buildtype=release build
$ meson compile -C build
$ meson install -C build

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 interface | --listen interface]
	[-u name | --afuxname name] [-n | --no-beacon] [-d | --daemon]
	[-e error_mask | --error-mask error_mask]
	[-h | --help]

Description of the options

  • -v (activates verbose output to STDOUT)
  • -i interfaces (comma separated list of CAN interfaces the daemon shall provide access to e.g. '-i can0,vcan1' - default: vcan0)
  • -p port (changes the default port '29536' the daemon is listening at)
  • -l interface (changes the default network interface the daemon will bind to - default: eth0)
  • -u name (the AF_UNIX socket path - an abstract name is used when the leading '/' is missing. N.B. the AF_UNIX binding will supersede the port/interface settings)
  • -n (deactivates the discovery beacon)
  • -e error_mask (enable CAN error frames in raw mode providing an hexadecimal error mask, e.g: 0x1FFFFFFF)
  • -d (set this flag if you want log to syslog instead of STDOUT)
  • -h (prints this message)

License

The source code is released under either GPL-2.0-only or BSD-3-Clause licenses.

About

Server to access CAN sockets over ASCII protocol

Resources

Readme
Activity
Custom properties

Stars

239 stars

Watchers

19 watching

Forks

65 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.