Skip to main content

MCU Connection Guide

Applicability Note

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

Preparation and Notes

  • Not Recommended Host Devices: Avoid using devices such as Redmi phones, WiFi dongles, and set-top boxes. These often use customized or modified systems that may fail to properly recognize the MCU.
  • Confirm Number of MCUs: Confirm in advance the number of MCUs (e.g., toolboards) you are using. Multiple MCUs may affect the connection.
  • Simplify Wiring: It is recommended to temporarily remove all wiring from the mainboard and toolboard except for data cables, retaining only the necessary data connections to eliminate interference.
  • Recommended Interface: The Fluidd interface is recommended as it provides a more intuitive display of the MCU connection status.

Step 1: Backup and Reset Configuration

1. Access the Host Interface

Visit the host machine's IP address in a browser (e.g., 192.168.101.179).

2. Locate Configuration File

Enter the web interface and find the configuration options in the left sidebar:

Fluidd Users: Click ..., then locate printer.cfg.

Mainsail Users: Click Machine, then locate printer.cfg.

3. Backup Configuration File

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

printer_Backup.cfg

Fluidd Example:

Mainsail Example:

4. Reset Configuration File

Reopen printer.cfg, clear all its contents, 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 errors appear, please ignore them for now.
  • Next, completely power off all devices (including the host and all MCUs).
  • Important: Ensure a complete power-down, or the following steps cannot proceed.

Step 2: Detect Devices and Confirm Firmware Type

Prerequisites

  • MCU Order: The first MCU must be the mainboard, not a toolboard.
  • Firmware Type: Confirm that your FLY mainboard firmware is either USB firmware or USB Bridged CAN firmware. This guide does not apply to other types.
  • Connection Method: Please connect via SSH first; this operation requires a network connection.

Procedure

  1. Run Device Detection

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

    • If the lsusb command is not found, install it first:
      sudo apt-get install usbutils
    • If no devices are displayed after execution, consider changing the host device.
  3. Identify Device Information According to the image below, identify your device in the lsusb output:

  4. Verify Firmware Type

    • Based on the firmware you flashed, check the following key information in the lsusb results:
      • USB Firmware: Should display 1d50:614e
      • USB Bridged 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 when using G2T)

Step 3: Search for Device IDs

Important Notes

  • USB ID Search: Only applicable to USB firmware, not CAN or RS232.
  • CAN ID Search: Only applicable to CAN bus devices, not USB or RS232.
  • RS232 ID Search: Only applicable to RS232 firmware, not USB or CAN.
  • RS232 Specificity: RS232 firmware is typically used only for toolboards, not for the main MCU.

Choose Method Based on Firmware Type

USB Firmware Devices Run the following command to search for USB device IDs:

ls /dev/serial/by-id/*

USB Bridged CAN Devices Based on your system type, choose the corresponding command to search for CAN IDs:

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

RS232 Firmware Devices Run 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 similar device IDs (example shown):

  • Ready to Use: If the ID is labeled as Klipper after the usb- field
  • ⚠️ Firmware Needs Flashing: If the ID is labeled as katapult after the usb- field

CAN ID Search Results

After executing the command, judge based on actual results:

  • Ready to Use: If the ID is labeled as Klipper in the Application: field at the end.
  • ⚠️ Firmware Needs Flashing: If the ID is labeled as CANBOOT or Katapult at the end of the Application: field.
  • Device Not Found: If Total 0 uuids found is displayed, possible causes include:
    • Incorrect CAN network configuration
    • Mismatched CAN speed (ensure the host, mainboard, and toolboard speeds are consistent)
    • The ID is already in use (disable it in the configuration, then power off and restart)

RS232 ID Search Results

After executing the command, the terminal will display the RS232 device path (example shown):

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

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

[mcu toolboard]
serial: <Replace with the RS232 device path obtained from the query>
baud: 250000
restart_method: command

Step 4: Configure the Main MCU ID

Preparation

Before starting the configuration, ensure that the connection between the toolboard and the host or mainboard is disconnected to avoid device identification 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.

Example Configuration:

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

# Modify the 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 is successful:

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

Step 6: Add Toolboard MCUs

After successfully verifying the main MCU, you can add the toolboard:

  1. Reconnect the Toolboard: Reconnect the toolboard's data cable to the host or mainboard.
  2. Edit the Configuration File: Add the toolboard configuration at the bottom of the printer.cfg file.
  3. Configure the Toolboard ID: Add the corresponding ID in the new configuration section based on the toolboard's firmware type.
MCU Naming Explanation

The names mcu1, mcu2, etc., in the configuration are only used for temporary differentiation between devices. You can fully customize these names, as long as they remain unique within the configuration file.

Configuration Format:

[mcu mcu1]
# Add the toolboard's ID configuration here

Configuration Examples:

[mcu mcu1]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_54321-if00

Notes:

  • Each MCU must use a unique ID. Ensure the toolboard ID is different from the main MCU and other devices.
  • MCU names can be fully customized (e.g., toolboard, extruder_mcu, etc.), as long as they remain unique in the configuration.
  • Be sure to use valid toolboard IDs verified in the previous steps.
  • RS232 devices must configure the baud: 250000 and restart_method: command parameters.
  • When configuring multiple toolboards, assign each a different name for easy identification.

After completing the configuration, save and restart the Klipper service.


Step 7: Verify All MCU Connections

After adding the toolboard and restarting Klipper, recheck the connection status of all MCUs:

  1. Open the Fluidd interface, click System in the left menu.
  2. Check MCU Information: Confirm that all MCUs are correctly recognized under Mcu Information.
  3. Verify Each MCU Status: Ensure both the main MCU and toolboard show as connected.
Verification Key Points
  • Both the main MCU and all toolboards should appear in the list.
  • The connection status for each MCU should be "Connected".
  • If any MCU is missing or fails to connect, check its configuration and physical connections.

Step 8: Check Firmware Versions

After all MCUs are connected, verify firmware version compatibility:

  1. Open the Fluidd interface, click System in the left menu.
  2. Check Version Information: Find the Version field under Mcu Information.
  3. Verify Version Consistency: Ensure all MCU firmware versions match the Klipper version on the host.
Version Compatibility Notes
  • 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 FAST systems aligns with the system version. The compiled Klipper firmware also matches the system version.
  • Consequences of Version Mismatch: Different firmware versions may cause functional issues, communication failures, or system instability.

Verification Points:

  • The Version information for the main MCU and all toolboards should be displayed and consistent.
  • If versions don't match, re-flash the corresponding firmware.

Step 9: Restore and Update the Configuration File

Once all MCUs are confirmed to be connected properly, restore the original configuration file and update the MCU configurations:

  1. Delete the Current Configuration File

    • In the configuration file management interface, locate and delete the current printer.cfg file.
  2. Restore the Backup Configuration

    • Rename the previously backed-up printer_Backup.cfg file to printer.cfg.
  3. Update MCU Configuration

    • Open the restored printer.cfg file.
    • Locate the original [mcu] configuration section and update it with the IDs obtained in previous steps:

    USB Connection Configuration:

    [mcu]
    serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00
    # Replace with the actual main MCU USB ID obtained

    CAN Connection Configuration:

    [mcu]
    canbus_uuid: 688e89f0e401
    # Replace with the actual main MCU CAN UUID obtained
  4. Update Toolboard Configuration (if applicable)

    • Locate the toolboard's [mcu] section in the configuration file.
    • Update it with the actual toolboard ID obtained based on the connection method:

    USB Toolboard:

    [mcu toolboard]
    serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_54321-if00

    CAN Toolboard:

    [mcu toolboard]
    canbus_uuid: 688e89f0e402

    RS232 Toolboard:

    [mcu toolboard]
    serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
    baud: 250000
    restart_method: command
  5. Save and Restart

    • After updating all MCU configurations, click SAVE & RESTART to save and restart Klipper.
    • Return to the System page and confirm that all MCU connection statuses are normal.
Important Reminder
  • Ensure you use the correct IDs actually searched during this connection test.
  • If multiple toolboards are configured, update each [mcu] section's ID one by one.
  • RS232 toolboards must include the baud: 250000 and restart_method: command parameters.
  • After restoring the configuration, existing printer parameters (such as stepper motors, endstops, etc.) will remain unchanged.

At this point, MCU connection troubleshooting and configuration restoration are complete.

Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
Loading...