Skip to content

Instantly share code, notes, and snippets.

@andre-hartmann
Created November 26, 2017 16:50
Show Gist options
  • Save andre-hartmann/d3c87cc91d7a6a41b6001ab8fec46365 to your computer and use it in GitHub Desktop.
Save andre-hartmann/d3c87cc91d7a6a41b6001ab8fec46365 to your computer and use it in GitHub Desktop.
canbusutil test script
#!/bin/bash
util=~/git/qt5/qtbase/bin/canbusutil
function print()
{
echo
echo $*
}
print List plugins:
$util -L
print List devices for socketcan:
$util -d socketcan
print List devices for peakcan:
$util -d peakcan
print List devices for systeccan:
$util -d systeccan
print Connect to systeccan can0.0:
$util -l systeccan can0.0
print Send RTR frame:
$util socketcan vcan0 123#R
print Send RTR frame 8:
$util socketcan vcan0 123#R8
print Send RTR frame 9:
$util socketcan vcan0 123#R9
print Send RTR frame x:
$util socketcan vcan0 123#Rx
print Send RTR frame 4x:
$util socketcan vcan0 123#R4x
print Send RTR frame FD:
$util socketcan vcan0 123##R
print Send RTR frame FD 8:
$util socketcan vcan0 123##R8
print Send data frame 0:
$util socketcan vcan0 123#
print Send data frame with flags:
$util socketcan vcan0 123#0
print Send data frame 1:
$util socketcan vcan0 123#11
print Send data frame 8:
$util socketcan vcan0 123#1122334455667788
print Send data frame 9:
$util socketcan vcan0 123#112233445566778899
print Send FD data frame 0:
$util socketcan vcan0 123##0
print Send FD data frame no flags:
$util socketcan vcan0 123##00
print Send FD data frame 64:
$util socketcan vcan0 123##000112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233
print Send FD data frame 65:
$util socketcan vcan0 123##00011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment