MCU Connection Guide
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.
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.
For Mainsail users: Click on Machine, then find printer.cfg.
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:
Example for Mainsail operation:
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
MCUmust 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
-
Execute Device Detection
- After successfully connecting via SSH, run the following command:
lsusb
- The system will list all recognized USB devices.
- After successfully connecting via SSH, run the following command:
-
Handle Command Exceptions
- If the prompt indicates
lsusbcommand not found, install it first:sudo apt-get install usbutils - If no devices are displayed after execution, consider replacing the upper computer.
- If the prompt indicates
-
Identify Device Information According to the diagram below, identify your device in the
lsusboutput:Loading...Loading... -
Verify Firmware Type
- Based on the firmware you flashed, verify the following key information in the
lsusbresults:- 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)
- USB Firmware: Should display
- Based on the firmware you flashed, verify the following key information in the
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:
- Regular Upper Computer
- Fly_FAST System
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
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 byKlipper(e.g.,usb-Klipper_stm32f407xx_...), indicating Klipper firmware has been flashed - Requires firmware flashing: The
usb-field is followed bykatapult(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 by1a86_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
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 labeledKlipper - Requires firmware flashing: The
Application:field at the end of the displayed ID is labeledCANBOOTorKatapult - Device not found: If
Total 0 uuids foundis 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)
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 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
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:
- USB Connection Configuration
- CAN Connection 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
Replace the serial: /tmp/klipper_host_mcu configuration item with canbus_uuid: and fill in the searched CAN ID.
Configuration Example:
# The searched CAN ID is:
# 688e89f0e401
# Modify configuration to:
[mcu]
canbus_uuid: 688e89f0e401
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:
- Open the Fluidd interface, click on
Systemin the left menu - Check MCU Information: Find the
Micro-Controllerinformation underMcu Information - Verify Main Controller Model: Confirm that the displayed model matches the actual main controller model of your mainboard
- If your main controller is STM32H723,
Micro-Controllermust display a model related to H723 - If the display is incorrect or unrecognizable, please check the previous configuration steps
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.