CAN programming interface environment
Version 3.10
Loading...
Searching...
No Matches
can-error

The purpose of the command-line tool can-error is to send CAN error frames to an active CANpie FD Server channel.

Description

can-error [options] interface

The options are as follows:

-h, --help     Displays this help.
-e <type>      Set error type to [NONE|BIT0|BIT1|STUFF|FORM|CRC|ACK]
-g <gap>       Time gap in milliseconds between multiple error frames
-H <host>      Connect to <host>
-n <count>     Terminate after transmission of <count> error frames
-R <value>     Set receive error counter to <value>
-T <value>     Set transmit error counter to <value>
-i <R|T>       Increment the requested error counter
-v, --version  Displays version information.

The command requires a CAN interface as argument, where can1 is the first CAN interface.

Examples

Send a CAN error frame on CAN interface 2 and set the receive error counter to 8:

can-error -R 8 can2

Send a CAN error frame on CAN interface 1 and set the transmit error counter to 128, causing an error‑passive state:

can-error -T 128 can1

See also

Use can-send for transmission of CAN frames and can-dump for receiving CAN frames.