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 normally.

Preparations 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 prevent proper MCU recognition.
  • Confirm Number of MCUs: Make sure in advance how many MCUs (such as tool boards) you are using. Multiple MCUs may affect connectivity.
  • Simplify Wiring: It is recommended to temporarily remove all wiring except for data cables from the main board and tool boards to eliminate interference.
  • Recommended Interface: Fluidd interface is recommended, as it provides a more intuitive display of MCU connection status.

Step 1: Backup and Reset Configuration

1. Access the Host Machine 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 option 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 on 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

Re-open printer.cfg, clear all 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 temporarily.
  • Then, completely power off all devices (including the host and all MCUs).
  • Important: Ensure a complete power-off, otherwise subsequent steps cannot proceed.

Step 2: Detect Devices and Confirm Firmware Type

Prerequisites

  • MCU Order: The first MCU must be the main board, not a tool board.
  • Firmware Type: Confirm that your FLY motherboard firmware is USB firmware or USB-to-CAN firmware; this guide does not apply to other types.
  • Connection Method: Please first connect via SSH, which must be done over the network.

Operating Steps

  1. Perform 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 lsusb 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 figure 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-to-CAN Firmware: Should display 1d50:606f
      • USB Katapult Firmware: Should display 1d50:6177
      • RS232 Adapter (used with UTOR or D8/D8PRO boards): Should display 1a86:7523 (this step is not required for G2T)

Step 3: Search for Device IDs

Important Notes

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

Select Method Based on Firmware Type

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

ls /dev/serial/by-id/*

USB-to-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 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 a device ID similar to the one below (example):

  • Can be used directly: If the ID is labeled as Klipper after the usb- field
  • ⚠️ Firmware needs to be reflashed: If the ID is labeled as katapult after the usb- field

CAN ID Search Results

After executing the command, judge based on the actual situation:

  • Can be used directly: If the ID ends with Application: labeled as Klipper.
  • ⚠️ Firmware needs to be reflashed: If the ID ends with Application: labeled as CANBOOT or Katapult.
  • Device not found: If Total 0 uuids found is displayed, possible causes include:
    • CAN network configuration error
    • CAN speed mismatch (ensure the host, main board, and tool board speeds are consistent)
    • The ID is already in use (needs to be masked 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):

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

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

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

Step 4: Configure the Main MCU ID

Preparation

Before starting the configuration, ensure the tool board is disconnected from the host or main board to avoid device recognition conflicts.

Re-open 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 the configuration as:
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00

Save the configuration and restart the Klipper service.


Step 5: Verify the Main MCU Connection

After completing the main MCU configuration, verify the connection:

  1. Open the Fluidd interface, click on System in the left menu.
  2. View MCU Information: Under Mcu Information, find the Micro-Controller information.
  3. Verify the Controller Model: Ensure the displayed model matches the actual controller on your main board.
Verification Points
  • If your controller 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 Tool Board MCUs

After successfully verifying the main MCU, you can add tool boards:

  1. Reconnect the Tool Board: Reconnect the tool board data cable to the host or main board.
  2. Edit the Configuration File: At the bottom of the printer.cfg file, add the tool board configuration.
  3. Configure the Tool Board ID: Based on the tool board's firmware type, add the corresponding ID in the new configuration section.
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 in the configuration file.

Configuration Format:

[mcu mcu1]
# Add the tool board ID configuration here

Configuration Example:

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

Notes:

  • Each MCU must use a unique ID. Ensure the tool board ID differs 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.
  • Ensure you use valid tool board IDs verified in the previous steps.
  • RS232 devices must include the baud: 250000 and restart_method: command parameters.
  • When configuring multiple tool boards, assign different names to each device for easy identification.

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


Step 7: Verify All MCU Connections

After adding the tool boards and restarting Klipper, re-verify the connection status of all MCUs:

  1. Open the Fluidd interface, click on System in the left menu.
  2. View MCU Information: Under Mcu Information, confirm that all MCUs are correctly recognized.
  3. Verify Each MCU Status: Ensure both the main MCU and tool boards show as connected.
Verification Points
  • The main MCU and all tool boards should appear in the list.
  • Each MCU's connection status should show as "Connected".
  • If any MCU does not appear or fails to connect, check its configuration and physical connections.

Step 8: Check Firmware Version

After connecting all MCUs, verify firmware version compatibility:

  1. Open the Fluidd interface, click on System in the left menu.
  2. View Version Information: Under Mcu Information, locate the Version field.
  3. Verify Version Consistency: Ensure the firmware version of all MCUs matches 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 host Klipper version.
  • Fly-FAST System: FAST system firmware versions are aligned 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 tool boards should be displayed and consistent.
  • If versions do not match, re-flash the corresponding firmware.

Step 9: Restore and Update Configuration File

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

  1. Delete Current Configuration File

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

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

    • Open the restored printer.cfg file.
    • Find the original [mcu] configuration section and update it with the ID 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 found earlier

    CAN Connection Configuration:

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

    • In the configuration file, locate the tool board's [mcu] section.
    • Update it with the actual tool board ID found based on the connection method:

    USB Tool Board:

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

    CAN Tool Board:

    [mcu toolboard]
    canbus_uuid: 688e89f0e402

    RS232 Tool Board:

    [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.
    • Re-enter the System page to confirm all MCU connection statuses are normal.
Important Reminder
  • Ensure you use the correct IDs actually found during this connection test.
  • If configuring multiple tool boards, update each [mcu] section's ID one by one.
  • RS232 tool boards 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...