Test FD CAN

  1. Configure both the CAN interfaces with required bitrates:
    # sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
    # sudo ip link set can0 up
    # sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd 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 can1
  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. 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.