Skip to main content

MCU Connection Guide

Applicability Note

This guide is used to troubleshoot and resolve issues where the MCU cannot connect properly to Klipper.

Preparations and Precautions

  • Unrecommended Upper Computer Devices: Avoid using devices such as Redmi phones, WiFi sticks, or set-top boxes. These typically run customized or modified systems, which may prevent correct MCU recognition.
  • Confirm Number of Lower Computers: Please confirm the number of lower computers (e.g., tool boards) you are using in advance. Multiple lower computers may affect the connection.
  • Simplify Wiring: It is recommended to temporarily remove all wiring except the data cables from the mainboard and tool board, keeping only the necessary data connections to eliminate interference.
  • Recommended Interface: Using the Fluidd Interface is recommended, as it displays MCU connection status more intuitively.

Step 1: Backup and Reset Configuration

1. Access the Upper Computer Interface

Enter the IP address of the upper computer in your browser to access it.

Loading...

2. Locate the Configuration File

Enter the WEB interface and find the configuration option in the left sidebar:

For Fluidd users: Click on ..., then find printer.cfg.

Loading...

For Mainsail users: Click on Machine, then find printer.cfg.

Loading...

3. Backup the Configuration File

Right-click the printer.cfg file, select Duplicate to copy it, and rename the copy to:

printer_Backup.cfg

Example for Fluidd operation:

Loading...

Example for Mainsail operation:

Loading...

4. Reset the Configuration File

Reopen printer.cfg, clear all content, and paste the following base configuration:

[mcu]
serial: /tmp/klipper_host_mcu

[printer]
kinematics: none
max_velocity: 200
max_accel: 1000

5. Save and Restart

  • Click SAVE & RESTART in the top right corner. Klipper will save the configuration and restart the service.
  • If errors appear, please ignore them for now.
  • Then, completely disconnect power from all devices (including the upper computer and all lower computers).
  • Important: Ensure a complete power-off; otherwise, subsequent steps cannot be performed.

Step 2: Detect Devices and Confirm Firmware Type

Prerequisites

  • Main Device Order: The first MCU must be the mainboard, not a tool board.
  • Firmware Type: Confirm that your FLY mainboard firmware is USB Firmware or USB-to-CAN Bridge Firmware. This guide does not apply to other types.
  • Connection Method: Please connect via SSH first. This operation requires a network connection.

Operation Steps

  1. Execute Device Detection

    • After successfully connecting via SSH, run the following command:
      lsusb
    • The system will list all recognized USB devices.
  2. Handle Command Exceptions

    • If the prompt indicates lsusb command not found, install it first:
      sudo apt-get install usbutils
    • If no devices are displayed after execution, consider replacing the upper computer.
  3. Identify Device Information According to the diagram below, identify your device in the lsusb output:

    Loading...
    Loading...
  4. Verify Firmware Type

    • Based on the firmware you flashed, verify the following key information in the lsusb results:
      • USB Firmware: Should display 1d50:614e
      • USB to CAN Bridge Firmware: Should display 1d50:606f
      • USB Katapult Firmware: Should display 1d50:6177
      • RS232 Adapter (paired with UTOR or using D8 & D8PRO mainboards): Should display 1a86:7523 (paired with G2T, this step is not required)

Step 3: Search for Device ID

Important Notes

  • USB ID Search: Applicable only to USB Firmware, not for CAN or RS232.
  • CAN ID Search: Applicable only to CAN Bus Devices, not for USB or RS232.
  • RS232 ID Search: Applicable only to RS232 Firmware, not for USB or CAN.
  • RS232 Specificity: RS232 firmware is typically used only for tool boards, not for the main MCU.

Choose Method Based on Firmware Type

USB Firmware Devices Execute the following command to search for the USB device ID:

ls /dev/serial/by-id/*

USB to CAN Bridge Devices Choose the corresponding command to search for the CAN ID based on your system type:

~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

RS232 Firmware Devices Execute the following command to search for the RS232 device path:

ls /dev/serial/by-path/*

Result Interpretation and Handling

USB ID Search Results

After executing the command, the terminal will display a device ID similar to the one below (this is an example):

  • Ready to use: The usb- field is followed by Klipper (e.g., usb-Klipper_stm32f407xx_...), indicating Klipper firmware has been flashed
  • Requires firmware flashing: The usb- field is followed by katapult (e.g., usb-katapult_stm32f407xx_...), indicating currently in Bootloader mode, requiring Klipper firmware to be flashed
  • Not recognized: In the example ID below, the usb- field is followed by 1a86_USB_Serial, indicating the device is a CH340 serial-to-USB chip, not an MCU running Klipper/katapult firmware. The corresponding firmware needs to be flashed first
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  • Normal condition is as follows
Loading...

CAN ID Search Results

After executing the command, determine based on the terminal output:

  • Ready to use: The Application: field at the end of the displayed ID is labeled Klipper
  • Requires firmware flashing: The Application: field at the end of the displayed ID is labeled CANBOOT or Katapult
  • Device not found: If Total 0 uuids found is displayed, possible reasons include:
    • Incorrect CAN network configuration
    • CAN rate mismatch (ensure the upper computer, mainboard, and tool board rates are consistent)
    • The ID is already occupied (requires shielding in the configuration, then shutdown, power off, and restart)
Loading...

RS232 ID Search Results

After executing the command, the terminal will display the RS232 device path (this is an example):

  • Example path: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
RS232 Configuration Special Requirements

RS232 devices must have the baud rate and restart method specified in the configuration:

[mcu toolboard]
serial: <Replace this with the queried RS232 device path>
baud: 250000
restart_method: command

Step 4: Configure the Main MCU ID

Preparations

Before starting the configuration, ensure the connection between the tool board and the upper computer or mainboard is disconnected to avoid device recognition conflicts.

Reopen the printer.cfg file and locate the serial: /tmp/klipper_host_mcu configuration line in the [mcu] section.

Based on your connection method, refer to the corresponding method below for configuration:

Replace /tmp/klipper_host_mcu after serial: with the searched USB ID.

Configuration Example:

# The searched USB ID is:
# /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00

# Modify configuration to:
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00

Save the configuration and restart the Klipper service.


Step 5: Verify Main MCU Connection

After completing the main MCU configuration, verify that the connection was successful:

  1. Open the Fluidd interface, click on System in the left menu
  2. Check MCU Information: Find the Micro-Controller information under Mcu Information
  3. Verify Main Controller Model: Confirm that the displayed model matches the actual main controller model of your mainboard
Verification Points
  • If your main controller is STM32H723, Micro-Controller must display a model related to H723
  • If the display is incorrect or unrecognizable, please check the previous configuration steps
Loading...

Step 6: Add Tool Board MCU

If the main MCU has been connected successfully, and you also need to add a tool board, multiple MCUs, or cross-board pin configuration, please continue to: Tool Board MCU Addition and Cross-Board Configuration.

At this point, the main MCU connection troubleshooting has been completed.

Loading...