Skip to main content

CAN FAQ

Precautions Before Searching for Devices

  • Before searching for a CAN ID, please connect to SSH
  • Please ensure you are logging in to SSH via network, not through a serial port
  • Please ensure that you have either connected a UTOC or a mainboard with the CAN bridge firmware flashed, and that the data cable connecting to the host computer is capable of data transmission

Confirming Device Presence

  • Now that you have successfully logged into the host computer, you can enter lsusb to search for devices. You may encounter one of the following situations:
    • If entering lsusb prompts that the ls command is not found, you can install the command using the following instruction:
      sudo apt-get install usbutils
    • If entering lsusb produces no output at all, this is a system issue that cannot be resolved here. You will need to change the system or use a known functional system
    • If the information shown in the image below appears, please note that this is for reference only. You only need to confirm that 1d50:606f appears:
  • 1d50:606f is the device you will use in this case. You can ignore the following prompts since system issues may cause incomplete display or no display at all
  • If there are multiple 1d50:606f entries, it is recommended to remove one, as this may affect subsequent firmware flashing and connection. For example, for the FLY MINI PAD, it is recommended to use the onboard UTOC and avoid using other CAN bridge devices
  • If none are found, please check whether the data cable is properly connected and whether the correct firmware has been flashed.
Note

You can only proceed to search for the CAN ID when 1d50:606f is present

Diagnosing Issues Based on Error Messages

  • Below are common error messages:
    • OSError: [Errno 19] No such device
    • can.CanError: Failed to transmit: [Errno 100] Network is down
    • can.CanError: Failed to transmit: [Errno 105] No buffer space available
  • The first error indicates that the host computer cannot find the CAN device (mainboard with USB bridge firmware or UTOC)
  • The second error indicates that the host computer has not configured CAN0 correctly or not at all
  • The third error usually indicates that the host computer's buffer is full or there is a system issue causing buffer failure
  • For the second and third errors, refer to the section below titled "Configuring CAN0" for troubleshooting
  • If no ID is found, please refer to the instructions at the end of this document

Checking Whether the Host Supports CAN

  • This step is not required if you are using a FLY host
  • If your system is Ubuntu, you need to configure Ubuntu for CAN0 (documentation not yet updated)
  • Enter the following command to check whether the system supports CAN:
sudo modprobe can && echo "Your kernel supports CAN" || echo "Your kernel does not support CAN"
  • After entering the above command, if your kernel supports CAN, it will return: Your kernel supports CAN; if not, it will return: Your kernel does not support CAN.
  • If it returns Your kernel supports CAN, you can proceed to the next step of configuring CAN0

Configuring CAN0

  • This command will overwrite the existing CAN0 configuration in the system. After execution, the system needs to be restarted
  • Do not perform this step if you are using the FAST system !!!!!!
  • Choose one of the following commands based on your actual requirements

  • For 1M baud rate, enter the following command:
sudo /bin/sh -c "cat > /etc/network/interfaces.d/can0" << EOF
allow-hotplug can0
iface can0 can static
bitrate 1000000
up ifconfig $IFACE txqueuelen 1024
pre-up ip link set can0 type can bitrate 1000000
pre-up ip link set can0 txqueuelen 1024
EOF

  • For 500K baud rate, enter the following command:
sudo /bin/sh -c "cat > /etc/network/interfaces.d/can0" << EOF
allow-hotplug can0
iface can0 can static
bitrate 500000
up ifconfig $IFACE txqueuelen 1024
pre-up ip link set can0 type can bitrate 500000
pre-up ip link set can0 txqueuelen 1024
EOF
  • Restart the device
sudo reboot

Things to Check If ID Cannot Be Found

  • If Klipper has configured a specific ID, you need to disable the ID in the system settings, then power off the system, disconnect power, and power it back on or press the reset button on the mainboard
  • Check whether the CAN baud rate of the host matches that of the mainboard, toolboard, etc.
  • You can use the following code to determine the CAN baud rate of the host
  • Check for any disconnected wires
  • Check whether the toolboard and the device (mainboard with USB bridge firmware or UTOC) have the 120Ω jumper installed
  • If the 120Ω jumper is installed, use a multimeter to measure the resistance between CAN H and CAN L with the device completely powered off. The resistance should be around 60Ω
  • Recheck for any disconnected wires
ip -details link show can0
  • The circled area in the image below shows the CAN baud rate and buffer size of the host
  • The 1024 above indicates the current buffer size of CAN0
  • The 1000000 below indicates the current baud rate of CAN0
  • If the UUID still cannot be found, please carefully check the following points:

    • Check whether the mainboard or CAN toolboard is properly connected
    • Ensure proper power supply; it is recommended to connect the VCC power when using the mainboard
    • Check whether the host supports CAN networking
    • Measure whether the CAN resistance is around 60Ω
    • Confirm whether the firmware was compiled correctly

Searching for ID

  • Enter the following command to search for the ID:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
  • If an ID appears and the Application: at the end shows Klipper, this ID can be used directly
  • If an ID appears and the Application: at the end shows CANBOOT or Katapult, it means that the firmware needs to be flashed before use
Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
Loading...