Skip to content

CAN Interface Configuration

Cyphal-Device-Library: USBTingo FD vs classic

# example classic CAN
export UAVCAN__CAN__IFACE=usbtingo:17318E90 UAVCAN__CAN__BITRATE="1000000 1000000" UAVCAN__NODE__ID=127 UAVCAN__CAN__MTU=8

# example CAN-fd
export UAVCAN__CAN__IFACE=usbtingo:17318E90 UAVCAN__CAN__BITRATE="1000000 5000000" UAVCAN__NODE__ID=127 UAVCAN__CAN__MTU=64

Linux

Socketcan:

Show Status: ip -details -statistics addr ls dev can0

Set to classic CAN:

sudo ip link set can0 type can bitrate 1000000
sudo ip link set can0 type can sample-point 0.875
sudo ip link set can0 type can mtu 16

Set to CAN-FD:

sudo ip link set can0 type can bitrate 1000000
sudo ip link set can0 type can sample-point 0.875
sudo ip link set can0 type can dbitrate 5000000
sudo ip link set can0 type can dsample-point 0.875
sudo ip link set can0 type can mtu 72

Activate Link:

ip link set can0 up