CANCONFIG(8) | System Manager's Manual | CANCONFIG(8)

# NAME

`canconfig` — configure CAN network interface parameters

# SYNOPSIS

`canconfig` | `-a`

`canconfig` | canif

`canconfig` | can command [args ...]

# DESCRIPTION

The `canconfig` utility is used to configure CAN network interface parameters and retrieve CAN network interface parameters and status from the kernel.

## Timing

The base time unit used to define the network bit rate is the time quanta (tq), its value is defined by the input clock frequency and the prescaler value as (1/ freq * prescaler).

The network bit time is split in 4 segments:

sync_seg
  fixed to 1 tq
prop_seg
phase_seg1
phase_seg2

The network bit time is (1 + prop_seg + phase_seg1 + phase_seg2), in tq. The sample point is between phase_seg1 and phase_seg2.

The receiver hardware is allowed to shorten prop_seg or phase_seg2 to resynchronize with the sender. The swj (Synchronisation Jump Width) parameter defines by how much the hardware can shorten these segments.

Some hardware can use 3 sample points instead of one, and keep the majority as the final value.

## Options

The options are as follows:

`-a`
  Display the status of all CAN devices present on the system. This flag is mutually exclusive with all other sub-commands.

All other operations require that a CAN interface be specified. If a CAN interface is specified with no sub-commands, the status of that interface is displayed.

The following sub-commands are available:

`up`
  Start network operations on the interface. Requires that all timing parameters have been set.
`down`
  Stop network operations on the interface.
`brp` value
  Set the value of the baud rate prescaler.
`prop_seg` value
  Set the number of tq for the propagation segment.
`phase_seg1` value
  Set the number of tq for the phase segment 1.
`phase_seg2` value
  Set the number of tq for the phase segment 2.
`sjw` value
  Set the number of tq for the Synchronisation Jump Width.
`3samples`
  Enable triple-sampling.
`-3samples`
  Disable triple-sampling.
`listenonly`
  Enable listen-only mode. In this mode the controller is passive, and doesn't send ACKs on the bus.
`-listenonly`
  Disable listen-only mode.
`loopback`
  Enable loopback mode. In this mode, the controller doesn't expect ACK from the bus.
`-loopback`
  Disable loopback mode.

# SEE ALSO

ifconfig.if(5), ifconfig(8)

# HISTORY

The `canconfig` utility first appeared in NetBSD 8.0.

# AUTHORS

This version of the `canconfig` utility was written by Manuel Bouyer.

April 15, 2017 | NetBSD 11.0