set interface bitrate:
# ip link set can0 type can bitrate 1000000
set interface up
# ip link set can0 up
For an automatic configuration of the CAN bus on systems using systemd
, just create a 80-can.network
file in /etc/systemd/network
, with the following content
[Match] Name=can0 [CAN] BitRate=1M RestartSec=100ms
Test RX:
# candump can0,0:0,#FFFFFFFF
Test TX:
# cansend can0 <ID>#<byte1>.<byte2>.<...>.<byte8>