Skip to main content

Wired Connection Klipper Configuration

Notice
  • The STM32F072 needs to be flashed with firmware before connecting to Klipper, otherwise wired connection operations will not be supported.

Start Compilation

  • A host machine with the installed klipper service is required Connect via SSH over the network
  • Make sure the device is connected to the host machine
  • Note: Please use a regular host machine, such as a Raspberry Pi FLY board, etc. If it's a modified host machine (e.g., WiFi stick, Redmi, etc.), due to too many issues, we cannot provide technical support for these machines
warning
  • To switch from the ROOT user to a regular user, you can enter the command below
  • Do not use the ROOT user
  • For the fly user, you can directly enter: su fly. For non-fly users, please replace <your host machine username> with your host machine's username!
su <your host machine username>
tip
  • 请确保上位机可以正常联网
  • 固件编译前需要使用SSH通过网络登录上位机
  • 请不要使用串口工具登录上位机

Klipper固件编译和配置页面操作说明

tip

请确保键盘输入法为半角模式,即英文模式

  1. 键盘上键,下键,用于上下移动光标来选中菜单项
  2. 确认键Enter 或 空格键Space,用于勾选菜单或进入子菜单
  3. 退出键ESC,用于返回上一级菜单
  4. Q键,用于退出Klipper固件配置页面
  5. Y键,在退出Klipper固件配置页面时,如果有提示,则点击Y键保存配置文件
warning

如果配置页面选项比较少,请先勾选[ ] Enable extra low-level configuration options,用于显示部分隐藏选项

Below is an introduction on how to compile the firmware:

  • After connecting to SSH, enter the following command and press Enter:

    cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig
  • Where rm -rf ~/klipper/.config && rm -rf ~/klipper/out is to delete previous compilation data and firmware, and make menuconfig is to compile the firmware. After execution, the following interface should appear:

  • Select Enable extra low-level configuration options and press Enter

  • Enter the menu Micro-controller Architecture then select STMicroelectronics STM32 and press Enter

  • Enter the menu Processor model, select STM32F072 and press Enter

  • Select Bootloader offset, select: (No bootloader)

  • Communication interface, select: USB (on PA11/PA12)

  • Press Q key, and when Save configuration appears, press Y key

  • The configuration should now be saved and you should exit to the command line interface

  • Input make -j4 to start compilation, it takes some time

  • If the following content is output, the compilation is successful

    Linking out/klipper.elf
    Creating hex file out/klipper.bin

Enter Burning Mode

  • With the AirClick powered off, press and hold the STM32's BOOT pin and connect the STM32's programming port to the host computer via Type-C

Confirm Whether Entering Burning Mode

  • Please ensure that the host machine can connect to the internet normally.

  • Please ensure that the data cable connecting the lower-level machine to the host machine has data transfer functionality.

  • After SSH connecting to the host machine, input lsusb and press enter. The following three scenarios may occur:

    • It will display the recognized USB devices.
    • It will prompt that there is no ls command; you can execute this command to install it:
      sudo apt-get install usbutils
    • There is no error message, but also no other information (a system issue requires replacing the system).
  • If there is no reaction after entering lsusb, this is a system issue, and we are unable to help; you need to replace with a confirmed normal system.

  • If the information circled in the following image appears, you can proceed to the next step.

  • 0843:df11 belongs to the device you will be using this time. You do not need to worry about the subsequent prompts as they may not fully display or may not display at all due to system issues.

  • If not, please check whether the data cable is properly connected or if the motherboard has entered DFU mode.

Note

Proceed to the next step only if there is 0843:df11.

Burn Firmware

  1. Install the burning tool
  • No need to execute the installation of the burning tool for the FLY upper computer
  • If you need to install, please note: The upper computer needs to be able to access the internet to install normally
  • If already installed, no need to install
sudo apt update
sudo apt install dfu-util -y
  1. Execute the following command to check if the connection is successful.
lsusb
  • If there is no DFU device, please try to re-enter burning mode

  • Due to system version issues, it may display other names. If 0483:df11 is shown, it indicates entering burning mode

  1. Burn the firmware
  • Execute the code below to start burning
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/klipper/out/klipper.bin
  1. If the content shown at the arrow in the following image is File downloaded successfully, then the burning is successful
tip

After burning, the main board needs to be completely powered off once.

Search USBID

  • Connect the AirClick's programming port to the host computer's USB port, do not press the BOOT button otherwise the ID cannot be searched

Search USB Tutorial

Precautions Before Searching for Devices

  • Please connect to SSH before searching for the USB ID (Connect to SSH)
  • Note that you must log in to SSH via the network rather than via serial port
  • Ensure that the mainboard with the flashed USB firmware is properly connected and that the data cable connecting it to the host computer has data transfer capability

Search for Devices

  • Ensure that the host computer can access the internet normally and that the data cable connecting the peripheral device to the host computer has data transfer capability.
  • After connecting to the host computer via SSH, enter lsusb and press Enter. If the information circled in the following image appears, you can proceed to the next step.
    • If there is no feedback, this indicates a problem with the host computer's system, and we are unable to assist; you need to replace the system with one that is confirmed to be working or replace the host computer.
    • If the instruction lsusb is not found, you can execute the following command to install it:
      sudo apt-get install usbutils
  • 1d50:6177 is the device you will be using for this task. The suffix OpenMoko, Inc. stm32f407xx is somewhat indicative but should not be used as a basis for judgment.
    • Some host computers may display incomplete or no information due to system issues.
    • If the lsusb command displays the device but does not show 1d50:6177, try changing the data cable and connecting the mainboard to another USB port on the host computer.
  • If you have previously executed the above steps and successfully burned the Klipper firmware, and the mainboard is running normally, but you just want to update the Klipper firmware, refer directly to the Firmware Update section in the right-hand menu of this page.
Precautions

You must query the 1d50:6177 device before proceeding to the next step.

Search for USBID

ls /dev/serial/by-id/*
  • Enter the command below and press Enter. If everything is normal, a blue ID will appear. (The ID below is for reference only)
  • If no ID appears after entering the command below, but lsusb shows devices, please replace the host computer or change the host computer system
Precautions

If multiple IDs appear, select the appropriate ID based on your mainboard's MCU model.

Fill in the USB ID into the Configuration

  • Open the printer web interface, find printer.cfg under the configuration options in the left sidebar: fluidd is {...}, mainsail is Machine, click to enter.

  • Copy the blue ID and paste it into the serial: field under the [mcu] section in the printer.cfg configuration file. After saving and restarting, the mainboard should be connected. If Klipper prompts ADC out of range, this is a normal phenomenon; connect the heated bed and thermistor properly, configure the thermistor and output pins for the nozzle and heated bed, then save and restart.

dangerous

Note: All IDs mentioned in the document are examples. Each mainboard's ID is different, so modify and fill in according to the actual ID obtained.