CANGEN(1)
β¨ CANGEN(1) β¨
okay bestie, welcome to the cangen manual page β she's a User Command and she's here to serve π
π NAME π
cangen β the manual page for cangen 2023.03-1build1, no cap
πΈ SYNOPSIS πΈ
cangen [options] <CAN interface>
π¦ DESCRIPTION π¦
cangen is literally a CAN frames generator. that's the whole vibe. she makes frames and she makes them on purpose β¨
π OPTIONS π
-g <ms>β gap in milli seconds, and the default is200 msπ«Ά-aβ use absolute time for the gap, periodt-tβ useSO_TXTIMEπ--start <ns>β start time, measured in UTC nanoseconds β°--mark <id>β setSO_MARKto<id>, and the default is1-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 (yes, "then", that's how she wrote it, iykyk)-mβ mix-e-f-b-E-Rframes together, it's giving chaos and we love her-I <mode>β CAN ID generation mode, peep below for the deets-L <mode>β CAN data length code (dlc) generation mode, also below-D <mode>β CAN data (payload) generation mode, also also below-p <timeout>β poll on-ENOBUFSto write frames with<timeout>ms π«-n <count>β terminate after<count>CAN frames, and the default is infinite π-iβ ignore-ENOBUFSreturn values onwrite()syscalls, living dangerously-xβ disable local loopback of generated CAN frames π«-c <count>β number of messages to send in burst, default is1-vβ increment verbose level for printing sent CAN frames, stack it up for more drama π
π Generation modes π
'r'=> random values, and yes this is the default babe'e'=> random values, even ID'o'=> random values, odd ID'i'=> increment values<value>=> fixed value (in hexadecimal for-Iand-D) π- => nibbles written as
'x'are randomized (only for-D) β so cute, so specific
the gap value (in milliseconds) may have decimal places, like '-g 4.73' β she's precise like that π
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. no cap, hex only π§
β EXAMPLES β
cangen vcan0 -g 4 -I 42A -L 1 -D i -v -v
fixed CAN ID and length, with incrementing data π
cangen vcan0 -e -L i -v -v -v
generate EFF frames with incrementing length, triple verbose because main character energy β¨
cangen vcan0 -D 11223344DEADBEEF -L 8
fixed CAN data payload and fixed length π
cangen vcan0 -D 11xx3344DEADBEEF -L 8
fixed CAN data payload where the 2. byte is randomized, with a fixed length β the xx ate π
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 and a 10ms timeout β°
cangen vcan0
my favourite default :) π«Ά couldn't be me picking anything else
ok so quick vibe check reminder: -8 really does say "greater then 8" in the original and we are NOT fixing her grammar, we are respecting her journey π
and that's the whole page bestie, you're fully caught up π mwah π
this was cangen 2023.03-1build1, dated December 2025 β from me and the rest of the User Commands girlies, slay responsibly π
π¦ where this page comes from
- ubuntu resolute: can-utils 2023.03-1build1 Β· GPL-2.0-only
- ubuntu stonking: can-utils 2023.03-1build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms