Scroll to navigation

CANCONFIG(8) Linux Programmer's Manual CANCONFIG(8)

NAME

canconfig - configure a CAN bus interface

SYNOPSIS

canconfig <interface>
canconfig <interface> baudrate { BR | BTR }
canconfig <interface> mode MODE
canconfig <interface> state

DESCRIPTION

canconfig is used to configure the kernel-resident CAN (Controller Area Network) interfaces. As CAN cards are network devices the basic configuration options can be done with ifconfig.

ARGUMENTS

The name of the interface. This is usually a driver name followed by a unit number, for example "can0".
The baudrate of the CAN interface can be set with a simple and complex method, which are chosen by using BR or BTR with the "baudrate" command.

BR: The baudrate of the interface can be set to one of the standard baud rates by setting a BR value. Example:

canconfig can0 baudrate 125

to set the interface can0 to 125 kBit/s. The standard baudrates are 10, 20, 50, 100, 125, 250, 500, 800 and 1000 kBit/s.

BTR: The CAN standard defines a second way for setting the baudrate, which uses a set of Bit Timing Registers (BTR). The number of and exact meaning of the BTR registers is chip dependend, so this interface offers the possibility to handle three BTR registers directly to the driver:

canconfig can0 baudrate btr <brt1> <btr2> <btr3>

This command sets the CAN controller into "start" mode. Example:

canconfig can0 mode start

This command lets you ask for the interface status.

SEE ALSO

- ifconfig(8)
- http://www.pengutronix.de/software/socket-can/ (Socket-CAN Project)

AUTHORS

Robert Schwebel <r.schwebel@pengutronix.de>

13 March 2005 canutils