Test Classic (Non-FD) CAN
- First, configure both the CAN interfaces with required
bitrates:
# sudo ip link set can0 type can bitrate 500000 berr-reporting on && sudo ip link set up can0 # sudo ip link set can1 type can bitrate 500000 berr-reporting on && sudo 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.
# cansend can0 220#50
The CAN packet sent by cansend is received on candump terminal.