MCU Connection Guide
This guide is used to troubleshoot and resolve issues where the MCU cannot connect properly to Klipper.
Preparation and Notes
- Non-recommended host devices: Avoid using devices such as Redmi phones, WiFi dongles, or TV boxes. These devices often use customized or modified systems, which may prevent proper MCU identification.
- Confirm the number of secondary MCUs: Confirm in advance the number of secondary MCUs (e.g., toolhead boards) you are using; multiple secondary MCUs may affect the connection.
- Simplify wiring: It is recommended to temporarily remove all wiring from the mainboard and toolboard except for the data cable, keeping only the necessary data connection to eliminate interference.
- Recommended interface: It is recommended to use the Fluidd interface, as it displays MCU connection status more intuitively.
Step 1: Backup and Reset Configuration
1. Access the Host Interface
Enter the host's IP address in the browser (e.g., 192.168.101.179) to access it.
2. Locate the Configuration File
Enter the WEB interface and find the configuration option in the left sidebar:
Fluidd Users: Click Loading... | Mainsail Users: Click 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
Fluidd Operation Example: Loading... | Mainsail Operation Example: Loading... |
4. Reset the Configuration File
Reopen printer.cfg, clear all content, and paste the following basic 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 an error occurs, please ignore it for now.
- Then, completely power off all devices (including the host and all secondary MCUs).
- Important: Ensure a complete power-off is performed; otherwise, the subsequent steps cannot proceed.
Step 2: Detect Devices and Confirm Firmware Type
Prerequisites
- Primary device order: The first
MCUmust be the mainboard, not a toolboard. - 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: First connect via SSH, this operation requires a network connection.
Steps
-
Execute Device Detection
- After successfully connecting via SSH, execute the following command:
lsusb
- The system will list all recognized USB devices.
- After successfully connecting via SSH, execute the following command:
-
Handle Command Errors
- If prompted that the
lsusbcommand does not exist, install it first:sudo apt-get install usbutils - If no devices are displayed after execution, consider replacing the host.
- If prompted that the
-
Identify Device Information Identify your device in the
lsusboutput based on the diagram below:Loading...Loading... -
Verify Firmware Type
- Based on the firmware you flashed, verify the following key information in the
lsusbresult:- USB firmware: Should show
1d50:614e - USB-to-CAN bridge firmware: Should show
1d50:606f - USB Katapult firmware: Should show
1d50:6177 - RS232 Adapter (used with UTOR or with D8 and D8PRO mainboards): Should show
1a86:7523(This step is unnecessary if using G2T)
- USB firmware: Should show
- Based on the firmware you flashed, verify the following key information in the
Step 3: Search for Device ID
Important Notes
- USB ID Search: Only applies to USB firmware, cannot be used for CAN or RS232.
- CAN ID Search: Only applies to CAN bus devices, cannot be used for USB or RS232.
- RS232 ID Search: Only applies to RS232 firmware, cannot be used for USB or CAN.
- RS232 Specificity: RS232 firmware is typically used only for toolboards, not for the main MCU.
Method Selection Based on Firmware Type
USB Firmware Device Execute the following command to search for the USB device ID:
ls /dev/serial/by-id/*
USB-to-CAN Bridge Device Select the appropriate command based on your system type to search for the CAN ID:
- Standard Host
- Fly_FAST System
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
python ~/klipper/scripts/canbus_query.py can0
RS232 Firmware Device Execute the following command to search for the RS232 device path:
ls /dev/serial/by-path/*
Result Interpretation and Handling
USB ID Search Result
After executing the command, the terminal will display a device ID similar to the following (example):
-
✅ Ready to use: If the ID is marked as
Klipperafter theusb-field -
⚠️ Firmware needs flashing: If the ID is marked as
katapultafter theusb-fieldLoading...
CAN ID Search Result
After executing the command, judge based on the actual situation:
- ✅ Ready to use: If the displayed ID is marked as
Klipperin theApplication:field at the end. - ⚠️ Firmware needs flashing: If the displayed ID is marked as
CANBOOTorKatapultin theApplication:field at the end. - ❌ Device not found: If
Total 0 uuids foundis displayed, possible reasons include:- Incorrect CAN network configuration
- CAN speed mismatch (ensure the host, mainboard, and toolboard have the same speed)
- The ID is already occupied (needs to be filtered in the configuration, then shut down, power off, and restart)
RS232 ID Search Result
After executing the command, the terminal will display the RS232 device path (example):
/dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
RS232 devices must specify the baud rate and restart method 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 toolboard and the host or mainboard is disconnected to avoid device identification conflicts.
Reopen the printer.cfg file and find 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:
# Searched USB ID:
# /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00
# Modified configuration:
[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:
# Searched CAN ID:
# 688e89f0e401
# Modified configuration:
[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 the connection is successful:
- Open the Fluidd interface, click
Systemin the left menu - View MCU information: Find the
Micro-Controllerinformation underMcu Information - Check the main control model: Confirm that the displayed model matches the actual main control model of your mainboard
- If your main control chip is STM32H723, then
Micro-Controllermust display an H723-related model - If the display is incorrect or unrecognizable, please check the previous configuration steps
Step 6: Add Toolboard MCU
After the main MCU is verified successfully, you can add the toolboard:
- Reconnect the toolboard: Reconnect the toolboard's data cable to the host or mainboard
- Edit the configuration file: Add the toolboard configuration at the bottom of the
printer.cfgfile - Configure toolboard ID: Add the corresponding ID in the newly added configuration section based on the toolboard's firmware type
Names like mcu1, mcu2 in the configuration are only for temporary differentiation. You can fully customize these names, just ensure they are unique in the configuration file.
Configuration Format:
[mcu mcu1]
# Add toolboard ID configuration here
Configuration Examples:
- USB Toolboard
- CAN Toolboard
- RS232 Toolboard
[mcu mcu1]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_54321-if00
[mcu mcu1]
canbus_uuid: 688e89f0e402
[mcu mcu1]
serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
baud: 250000
restart_method: command
Notes:
- Each MCU must use a unique ID. Ensure the toolboard ID is different from the main MCU and other devices.
- MCU names are fully customizable (e.g.,
toolboard,extruder_mcu), just ensure uniqueness in the configuration. - Be sure to use a valid toolboard ID verified through the previous steps.
- RS232 devices must include the
baud: 250000andrestart_method: commandparameters. - When configuring multiple toolboards, set a different name for each device for easy differentiation.
After completing the configuration, save and restart the Klipper service.
Step 7: Verify All MCU Connections
After adding the toolboard and restarting Klipper, re-verify the connection status of all MCUs:
- Open the Fluidd interface, click
Systemin the left menu - View MCU information: Confirm all MCUs are correctly recognized under
Mcu Information - Check each MCU status: Ensure the main MCU and toolboards show as connected
- The main MCU and all toolboards should appear in the list
- The connection status of each MCU should be "Connected"
- If a specific MCU is not displayed or connection fails, check its configuration and physical connection
Step 8: Check Firmware Version
After all MCU connections are established, verify firmware version compatibility:
- Open the Fluidd interface, click
Systemin the left menu - View version information: Find the
Versionfield underMcu Information - Check version consistency: Ensure the firmware versions of all MCUs match the Klipper version on the host
- Custom compiled firmware: Except for pre-configured custom devices, all self-compiled firmware must match the Klipper version on the host.
- Fly-FAST System: The firmware version for the FAST system is consistent with the system version. The compiled Klipper firmware matches the system version.
- Consequences of version mismatch: Different firmware versions can lead to functional anomalies, communication failures, or system instability.
Verification Points:
- The
Versioninformation for the main MCU and all toolboards should be displayed and consistent. - If versions do not match, the corresponding firmware needs to be reflashed.
Step 9: Restore and Update Configuration File
After confirming all MCU connections are normal, restore the original configuration file and update the MCU configuration:
-
Delete the current configuration file
- In the configuration file management interface, find and delete the current
printer.cfgfile.
- In the configuration file management interface, find and delete the current
-
Restore the backup configuration
- Rename the previously backed-up
printer_Backup.cfgfile toprinter.cfg.
- Rename the previously backed-up
-
Update MCU configuration
- Open the restored
printer.cfgfile. - Find the original
[mcu]configuration section and update it with the ID obtained from the previous steps:
USB Connection Configuration:
[mcu]serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00# Replace with the actual searched main MCU USB IDCAN Connection Configuration:
[mcu]canbus_uuid: 688e89f0e401# Replace with the actual searched main MCU CAN UUID - Open the restored
-
Update toolboard configuration (if applicable)
- Find the
[mcu]section corresponding to the toolboard in the configuration file. - Update it with the actual searched toolboard ID based on the connection method:
USB Toolboard:
[mcu toolboard]serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_54321-if00CAN Toolboard:
[mcu toolboard]canbus_uuid: 688e89f0e402RS232 Toolboard:
[mcu toolboard]serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0baud: 250000restart_method: command - Find the
-
Save and Restart
- After completing all MCU configuration updates, click SAVE & RESTART to save and restart Klipper.
- Re-enter the
Systempage to confirm all MCU connection statuses are normal.
- Ensure you use the correct ID actually searched during this connection test.
- If configuring multiple toolboards, update the ID for each
[mcu]section one by one. - RS232 toolboards must include the
baud: 250000andrestart_method: commandparameters. - After restoring the configuration, the original printer parameters (such as stepper motor and endstop settings) will remain unchanged.
The MCU connection troubleshooting and configuration restoration are now complete.