MCU Connection Guide
This guide is used to troubleshoot and resolve issues where an MCU cannot connect properly to Klipper.
Preparations and Precautions
- Not Recommended Host Devices: Avoid using devices like Redmi phones, WiFi dongles, set-top boxes, etc. They often use customized or modified systems, which may prevent proper MCU recognition.
- Confirm Number of MCUs: Please confirm in advance the number of MCUs (e.g., toolboards) you are using, as multiple 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 can display MCU connection status more intuitively.
Step 1: Backup and Reset Configuration
1. Access the Host Interface
Access the host by entering its IP address (e.g., 192.168.101.179) in your browser.
2. Locate the Configuration File
Enter the WEB interface, 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 upper right corner. Klipper will save the configuration and restart the service.
- If an error appears, please ignore it for now.
- Subsequently, completely power off all devices (including the host and all MCUs).
- Important: A complete power-off is mandatory; otherwise, subsequent steps cannot be performed.
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 bridge CAN firmware. This guide does not apply to other types.
- Connection Method: Please first Connect via SSH. This operation needs to be performed over the network.
Procedure
-
Perform 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 Exceptions
- 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 images below:Loading...Loading... -
Verify Firmware Type
- Based on the firmware you flashed, check for the following key information in the
lsusbresults:- USB Firmware: Should display
1d50:614e - USB Bridge CAN Firmware: Should display
1d50:606f - USB Katapult Firmware: Should display
1d50:6177 - RS232 Adapter (used with UTOR or D8/D8PRO mainboards): Should display
1a86:7523(not required if using G2T)
- USB Firmware: Should display
- Based on the firmware you flashed, check for the following key information in the
Step 3: Search for Device ID
Important Notes
- USB ID Search: Only applicable to USB firmware, cannot be used for CAN or RS232.
- CAN ID Search: Only applicable to CAN bus devices, cannot be used for USB or RS232.
- RS232 ID Search: Only applicable to RS232 firmware, cannot be used for USB or CAN.
- RS232 Specificity: RS232 firmware is typically only used for toolboards, not for the main MCU.
Choose Method Based on Firmware Type
USB Firmware Devices Execute the following command to search for USB device IDs:
ls /dev/serial/by-id/*
USB Bridge CAN Devices Choose the corresponding command to search for CAN IDs based on your system type:
- Standard Host
- 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 RS232 device paths:
ls /dev/serial/by-path/*
Result Interpretation and Handling
USB ID Search Results
After executing the command, the terminal will display device IDs similar to the example below:
-
✅ Ready to Use: If the ID is labeled as
Klipperafter theusb-field. -
⚠️ Requires Firmware Flash: If the ID is labeled as
katapultafter theusb-field.Loading...
CAN ID Search Results
After executing the command, judge based on the actual situation:
- ✅ Ready to Use: If the displayed ID is labeled as
Klipperin theApplication:field at the end. - ⚠️ Requires Firmware Flash: If the displayed ID is labeled as
CANBOOTorKatapultin theApplication:field at the end. - ❌ Device Not Found: If
Total 0 uuids foundis displayed, possible reasons include:- Incorrect CAN network configuration
- CAN rate mismatch (ensure host, mainboard, and toolboard rates are consistent)
- The ID is already occupied (needs to be blocked in the configuration, then shut down, power off, and restart)
RS232 ID Search Results
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 baud rate and restart method in the configuration:
[mcu toolboard]
serial: <Replace here with the queried RS232 device path>
baud: 250000
restart_method: command
Step 4: Configure the Main MCU ID
Before starting configuration, ensure the toolboard is disconnected from the host or mainboard to avoid device identification conflicts.
Reopen the printer.cfg file, find the serial: /tmp/klipper_host_mcu configuration line in the [mcu] section.
Configure according to your connection method by referring to the corresponding method below:
- USB Connection Configuration
- CAN Connection Configuration
Replace /tmp/klipper_host_mcu after serial: with the searched USB ID.
Configuration Example:
# 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:
# 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 if the connection is successful:
- Open the Fluidd interface, click
Systemin the left menu. - View MCU Information: Find the
Micro-Controllerinformation underMcu Information. - Verify Main Controller Model: Confirm the displayed model matches the actual main controller model of your mainboard.
- If your main controller is STM32H723, then
Micro-Controllermust display an H723-related model. - If the display is incorrect or unrecognized, please check the previous configuration steps.
Step 6: Add Toolboard MCU
After successfully verifying the main MCU, you can add the toolboard:
- Reconnect the Toolboard: Reconnect the toolboard's data cable to the host or mainboard.
- Edit Configuration File: Add the toolboard configuration at the very 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 used to temporarily distinguish different devices. You can completely customize these names, just ensure they remain unique within the configuration file.
Configuration Format:
[mcu mcu1]
# Add the toolboard's 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
Precautions:
- Each MCU must use a unique ID. Ensure the toolboard ID differs from the main MCU and other devices.
- MCU names can be completely customized (e.g.,
toolboard,extruder_mcu, etc.), just maintain uniqueness in the configuration. - Be sure to use the toolboard ID verified as effective in the previous steps.
- RS232 devices must include the
baud: 250000andrestart_method: commandparameters. - When configuring multiple toolboards, set different names for each device for easy distinction.
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: Under
Mcu Information, confirm all MCUs are correctly recognized. - Check Each MCU Status: Ensure both the main MCU and toolboard(s) show as connected.
- The main MCU and all toolboards should appear in the list.
- The connection status for each MCU should be "Connected".
- If an MCU is not displayed or fails to connect, check its configuration and physical connection.
Step 8: Check Firmware Version
After completing all MCU connections, verify firmware version compatibility:
- Open the Fluidd interface, click
Systemin the left menu. - View Version Information: Find the
Versionfield underMcu Information. - Verify Version Consistency: Confirm that the firmware version of all MCUs matches the host's Klipper version.
- Custom Compiled Firmware: Except for pre-configured custom devices, all self-compiled firmware must match the host's Klipper version.
- Fly-FAST System: The FAST system's firmware version is consistent with the system version. The compiled Klipper firmware matches the system version.
- Consequences of Version Mismatch: Different firmware versions may cause 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 re-flashed.
Step 9: Restore and Update Configuration File
After confirming all MCU connections are normal, restore the original configuration file and update the MCU configurations:
-
Delete 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 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 IDs obtained in the previous steps:
USB Connection Configuration:
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00
# Replace with the actual main MCU USB ID you searched for.CAN Connection Configuration:
[mcu]
canbus_uuid: 688e89f0e401
# Replace with the actual main MCU CAN UUID you searched for. - 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 toolboard ID you searched for, 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-port0
baud: 250000
restart_method: command - Find the
-
Save and Restart
- After updating all MCU configurations, 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 IDs actually searched for during this connection test.
- If configuring multiple toolboards, update the ID in 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, limit switch settings, etc.) will remain unchanged.
At this point, MCU connection troubleshooting and configuration restoration are complete.