Test FD CAN
- Configure both the CAN interfaces with required
bitrates:
# sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on && ip link set up can0 # sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on && ip link set up can1
- Open a new ssh terminal and run the following commands to receive CAN packets sent by
can0 interface.
# candump -x can0 &
- On another terminal, run the following to send one CAN packet via the can0 interface,
where 220 is the CAN ID and 50 is data bytes. The 1 after ## denotes that the bit-rate
switching (BRS) flag is
on.
# cansend can0 220##150
The CAN packet sent by cansend is received on candump terminal.