Skip to main content

CAN Bridging

CAN bus is a serial communication protocol bus designed for real-time applications, which can transmit signals using twisted-pair wires. It is one of the most widely used field buses in the world. The CAN protocol is used for communication between various components in automobiles, replacing expensive and cumbersome wiring harnesses. Its robustness has extended its use into other automation and industrial applications. Features of the CAN protocol include complete serial data communication, real-time support, transmission rates up to 1Mb/s, 11-bit addressing, and error detection capabilities. In 3D printers, CAN bus is used to reduce the number of wires connecting the print head to the motherboard. Originally, it required dozens of wires, but with CAN, only four wires are needed, significantly reducing the number of wires and simplifying the wiring process. This chapter provides a brief overview of CAN bridging usage.

Tool Board Connecting to Motherboard via CAN

  • Please note that the power line of the tool board is not connected to the CAN port, but to the 12V-24V power supply line.

Flashing the Motherboard Firmware

Searching for ID

  • If you need to use CAN, make sure your host computer has undergone CAN configuration.

Notice

Please ensure the motherboard is properly connected to the host computer before proceeding with the following operations.

warning

Please ensure that the CAN network on the host computer, the CAN rate of the bridge motherboard, and the CAN tool board rate are all consistent.

  • Before searching for CAN IDs, please first connect to SSH.
  • Please note that you need to ensure you are logging into SSH via the network, not via serial port.
  • Please ensure that the UTOC or a motherboard with CAN bridge firmware installed is properly connected, and the data cable connecting to the host computer has data transfer capability.
  • Now that you have successfully logged into the host computer, you can enter lsusb to search for devices. You will encounter one of the following situations:
    • Entering lsusb prompts that the ls command is not found; in this case, you can enter the following command to install the command:
      sudo apt-get install usbutils
    • Entering lsusb produces no response. This is a system issue beyond our control; you will need to replace the system or use a confirmed working system.
    • The information shown below appears. Please note that this is only for reference. You only need to confirm that 1d50:606f appears.
  • 1d50:606f belongs to the device you will be using. Ignore any subsequent prompts as they may be incomplete or not displayed due to system issues.
  • If there are multiple 1d50:606f, it is recommended to exclude one, otherwise it may affect subsequent firmware burning and connection, such as when using the FLY MINI PAD, it is recommended to use the onboard UTOC and not other CAN bridge devices.
  • If none appear, please check if the data cable is properly connected and if the firmware is correctly installed.
Note

You can only proceed with CAN ID search when 1d50:606f is present.

  • Enter the following command to search for IDs:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
  • If an ID appears and the Application: at the end shows Klipper, it means this ID can be used directly.
  • If an ID appears and the Application: at the end shows CANBOOT or Katapult, it means you need to flash the firmware to use it.

CAN Issue Collection

Notice
  • If you cannot find a CAN ID, refer to the documentation below.
  • CAN Issue Collection

Fill in the CAN ID into the Configuration

  • Open the printer's web interface. In the configuration options on the left sidebar, find fluidd: {...} ; mainsail: Machine, then click to access printer.cfg.

  • Copy the queried UUID and paste it into the [mcu] section of the printer.cfg configuration under canbus_uuid:. After saving and restarting, you should be able to connect to the motherboard. If Klipper prompts for firmware updates, ADC errors, etc., it indicates that Klipper has successfully connected to the motherboard.

    dangerous

    Note: All IDs mentioned in the document are examples. Each motherboard's ID is unique, so please modify according to the actual ID obtained.