Provided by: can-utils_2023.03-1_amd64 bug

NAME

       cangen - manual page for cangen 2023.03-1

SYNOPSIS

       cangen [options] <CAN interface>

DESCRIPTION

       cangen - CAN frames generator.

OPTIONS

       -g <ms>
              (gap in milli seconds - default: 200 ms)

       -a     (use absolute time for gap)

       -t     (use SO_TXTIME)

       --start <ns>
              (start time (UTC nanoseconds))

       --mark <id>
              (set SO_MARK to <id>, default 1)

       -e     (generate extended frame mode (EFF) CAN frames)

       -f     (generate CAN FD CAN frames)

       -b     (generate CAN FD CAN frames with bitrate switch (BRS))

       -E     (generate CAN FD CAN frames with error state (ESI))

       -R     (generate RTR frames)

       -8     (allow DLC values greater then 8 for Classic CAN frames)

       -m     (mix -e -f -b -E -R frames)

       -I <mode>
              (CAN ID generation mode - see below)

       -L <mode>
              (CAN data length code (dlc) generation mode - see below)

       -D <mode>
              (CAN data (payload) generation mode - see below)

       -p <timeout>
              (poll on -ENOBUFS to write frames with <timeout> ms)

       -n <count>
              (terminate after <count> CAN frames - default infinite)

       -i     (ignore -ENOBUFS return values on write() syscalls)

       -x     (disable local loopback of generated CAN frames)

       -c <count>
              (number of messages to send in burst, default 1)

       -v     (increment verbose level for printing sent CAN frames)

   Generation modes:
       'r'    => random values (default)

       'e'    => random values, even ID

       'o'    => random values, odd ID

       'i'    => increment values

              <value> => fixed value (in hexadecimal for -I and -D)

              => nibbles written as 'x' are randomized (only -D)

       The  gap value (in milliseconds) may have decimal places, e.g. '-g 4.73' When incrementing
       the CAN data the data length code minimum is set to 1.  CAN IDs and data content are given
       and expected in hexadecimal values.

EXAMPLES

       cangen vcan0 -g 4 -I 42A -L 1 -D i -v -v

              (fixed CAN ID and length, inc. data)

       cangen vcan0 -e -L i -v -v -v

              (generate EFF frames, incr. length)

       cangen vcan0 -D 11223344DEADBEEF -L 8

              (fixed CAN data payload and length)

       cangen vcan0 -D 11xx3344DEADBEEF -L 8

              (fixed CAN data payload where 2. byte is randomized, fixed length)

       cangen vcan0 -I 555 -D CCCCCCCCCCCCCCCC -L 8 -g 3.75

              (generate a fix busload without bit-stuffing effects)

       cangen vcan0 -g 0 -i -x

              (full load test ignoring -ENOBUFS)

       cangen vcan0 -g 0 -p 10 -x

              (full load test with polling, 10ms timeout)

       cangen vcan0

              (my favourite default :)