Skip to main content

Wired Connection Klipper Configuration

Notice
  • The STM32F072 needs to be flashed with firmware and connected to klipper; otherwise, the wired connection operation is not supported.

Start Compiling

  • A host computer with the klipper service installed is required. Connect SSH via network
  • And the device should be well connected to the host computer.
  • Note: Please use a common host computer, such as Raspberry Pi, FLY Pi, etc. If it is a modified host computer (such as WiFi stick, Redmi, etc.), due to too many problems with this type of host computer, technical support cannot be provided for you.
Precautions
  • Please do not use the ROOT user.
  • Command to switch users
su fly
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 the guide on how to compile the firmware:

  • After connecting to SSH, enter the command below 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 for compiling the firmware. After execution, the following interface should appear:

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

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

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

  • Select Bootloader offset, choose: (No bootloader)

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

  • Press the Q key, and "Save configuration" appears. Then press the Y key.

  • Now the configuration should be saved and you have exited to the command line interface.

  • Enter make -j4 to start compiling. It takes a bit of time.

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

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

Enter the Burning Mode

  • With the AirClick powered off, press the BOOT of the STM32 and connect the burning port of the STM32 to the host computer through the Type-C.

Confirm Whether to Enter the Burning Mode

  • Ensure the host machine can connect to the internet normally.

  • Ensure the data cable connecting the lower-level machine to the host machine has data transmission capabilities.

  • After SSH connecting to the host machine, enter lsusb and press enter. One of the following three situations may occur:

    • Displays USB devices that have been recognized.
    • Prompts that there is no ls command, you can execute this command to install it:
      sudo apt-get install usbutils
    • No error message, no other information (a system issue requires replacing the system).
  • If there is no reaction after entering lsusb, this is a system issue and cannot be resolved here; you need to replace a confirmed normal system.

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

  • 0843:df11 belongs to the device you will use this time. Ignore the subsequent prompts as system issues may cause them to display incompletely or not at all.

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

Note

Proceed to the next step only if you have 0843:df11.

Burn the Firmware

  1. Install the flashing tool
  • No need to install the flashing tool for the FLY GUI.
  • If you need to install it, please note: The GUI needs to be connected to the internet to install properly.
  • If you have already installed it, no need to install again.
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 flashing mode.

  • Due to system version issues, other names may be displayed. If 0483:df11 is shown, it indicates that the flashing mode has been entered.

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

After flashing is complete, you need to power off the motherboard completely.

Search for USBID

  • The burning port of AirClick needs to be connected to the USB port of the host computer. Do not press the BOOT button; otherwise, the ID cannot be searched.

Search USB Tutorial

Precautions Before Searching for Devices

  • Before searching for the USB ID, please first connect to SSH
  • Please make sure you are logging in via network SSH rather than serial port SSH
  • Please ensure that the motherboard with the USB firmware installed is properly connected, and the data cable connecting it to the host computer has data transfer capability

Search for Devices

  • Now that you have successfully logged into the host machine, you can enter lsusb to search for devices. You will encounter one of the following scenarios:
    • If entering lsusb prompts that the ls command is not found, you can enter the following command to install the command:
      sudo apt-get install usbutils
    • If entering lsusb produces no response, this indicates a system issue beyond our control. You need to change the system or use a confirmed working system.
    • If you see the information shown in the image below, note that this is just a reference. You only need to confirm the characters after the ID.
  • 1d50:614e belongs to the device you will be using. Ignore the rest of the prompt as the system issue may cause it to display incompletely or not at all.
  • If none of the above occur, please check if the data cable is properly connected and if the firmware is correctly installed.
Note

You can only search for the USB ID when you have 1d50:614e.

Search for USB ID

ls /dev/serial/by-id/*
  • Enter the command below and press Enter. If everything is normal, a blue ID will appear (the one below is just an example).
  • If no ID appears after entering the command below, but lsusb shows devices, try changing the host machine or the host machine's system.
Note

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

Fill in the USB ID in the Configuration

  • Open the printer web interface, find the configuration option in the left sidebar: for fluidd, it is {...}; for mainsail, it is machine, and click to access printer.cfg.

  • Copy the blue ID and fill it into the [mcu] section of the serial: parameter in the printer.cfg configuration file. Save and restart to connect to the motherboard. If Klipper displays ADC out of range, it is normal. Connect the bed and thermistor properly, configure the hotend and bed thermistor and output pins, then save and restart.

dangerous

Note: All IDs mentioned in the document are examples. The actual ID for each motherboard is unique. Please modify according to the actual ID obtained.