Skip to main content

Wired Connection Configuration

Notice
  • You need to flash the firmware on STM32F072 and connect it to Klipper before performing wired connection operations, otherwise wired connection operations will not be supported.

Start Compilation

  • You need an upper computer with the klipper service installed Connect via SSH over the network
  • And make sure the device is connected to the upper computer
  • Note: Please use a regular upper computer, such as a Raspberry Pi FLY board, etc. If you are using a modified upper computer, we cannot provide much assistance due to too many issues.
Note
  • Do not use the ROOT user
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 Q key, then Save configuration appears, press Y key again.

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

  • Enter make -j4 to start compilation, it might take some time.

  • The following output indicates successful compilation:

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

Enter Programming Mode

  • With AirClick powered off, hold the BOOT button on STM32 and connect the programming port of STM32 to the host machine via Type-C.

Confirm Programming Mode Entry

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

Flash 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 USB ID

  • You need to connect the programming port of AirClick to the host machine's USB port without holding 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.