Test Classic (Non-FD) CAN

  1. 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 can0 up
    # sudo ip link set can1 type can bitrate 500000 berr-reporting on
    # sudo ip link set can1 up
  2. Open a new ssh terminal and run the following commands to receive CAN packets sent by can0 interface.
    # candump can0
  3. 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.