Skip to main content

Connect Klipperr

Note
  • This tutorial only covers the method to connect klipper
  • Any other configurations and macros used need to be written by yourself

Flashing BL

Entering Flash Mode

  • There are two ways to enter flash mode
  • First method: With the motherboard completely powered off, press the BOOT button and then connect one end of a data transfer cable to the motherboard and the other end to your device
  • Second method: After connecting one end of a data transfer cable to the motherboard and the other end to your device, press the BOOT key and then press the RST key, then release the RST key and finally release the BOOT key

Flashing Firmware

  • Buffer BL firmware
    • Baidu Netdisk:Baidu Netdisk Download Link
    • GOOGLE Netdisk:GOOGLE Netdisk
Notice
  • System compatibility issues, please use the computer's USB2.0 for burning
  • If it still cannot be burned, please use the host machine for burning
  1. Burning tool Download link
  2. Need to download SetupSTM32CubeProgrammer and STM32 DFU driver
  3. Copy the firmware (klipper.bin) compiled in front or the precompiled Katapult firmware to any directory on the computer
  4. Use a Type-C data cable to connect the motherboard to the computer, make sure it is already:Enter DFU burning mode
  5. In STM32CubeProgrammer, select USB mode, refresh, and connect
  6. If no error pop-up appears, then the connection is successful.
    Warning

    If the content shown below appears, it indicates a problem with the computer or software, please use the host machine for burning:Host machine burning tutorial

  7. Click the download icon on the left and select several options below
  8. Click the Browse button indicated by the arrow, then select the firmware you need to burn
  9. Select Start address and enter 0x08000000
  10. Click Start automatic mode below to start burning the firmware
  11. The prompt below indicates that the firmware burning is complete

USB Firmware Compilation

Start Compiling

  • 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 the 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. 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, choose: 8KiB bootloader

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

  • Please verify against the following image to ensure it matches before proceeding

  • Press the Q key, and when Save configuration appears, press the Y key again
  • You should now have saved the configuration and exited to the command line interface
  • Enter the following command to start compiling, which may take some time
make -j4
  • If the following output appears, the compilation was successful

    Linking out/klipper.elf
    Creating hex file out/klipper.bin
  • Below is the operation record of the firmware compilation process
Asciinema cast

Entering Flash Mode

Tip

D5 boards produced after September 1, 2024 already have the Katapult firmware pre-flashed

  • After connecting the motherboard to the host computer with a TypeC data cable, double-click the reset button, at this point the LED on the motherboard will blink.
Warning
  • If there is no LED blinking, please re-flash the Katapult firmware:Flash Katapult Firmware
  • If there is no LED blinking, please proceed to the next step after flashing the Katapult firmware

Confirm Whether Entering Flash Mode

  • Please ensure that the host machine can connect to the network normally and ensure that the data cable connecting the lower-level machine to the host machine has data transmission function.
  • After SSH connecting to the host machine, input lsusb and press Enter. If the information circled in the following picture appears, you can proceed to the next step.
    • If there is no feedback at all, this is a system problem of the host machine, and we are unable to help. You need to replace with a confirmed normal system or replace the host machine.
    • If the prompt says there is no lsusb command, you can execute the following command to install it:
      sudo apt-get install usbutils
  • 1d50:6177 belongs to the device you will use this time.
    • Some host machines may not fully display or fail to display due to system problems.
    • If the lsusb command can display the device but does not show 1d50:6177, please try replacing the data cable and connecting the mainboard to another USB port on the host machine.
  • If you have executed the above steps before and successfully burned the Klipper firmware, and the mainboard is running normally, but you just want to update the Klipper firmware, please directly check the Firmware Update section in the right menu bar of this page.
Notice

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

Flashing Firmware

tip
  • When installing the programming plugin, you need to be connected to the internet. Please ensure that your host computer is already properly connected to the Internet.
  • If it has been installed, there is no need to install it again.

Start Programming

Warning
  • For non-fly host computers, please make sure to execute the following code to install the dependency package for firmware programming! Otherwise, the firmware cannot be programmed!
      cd && git clone https://github.com/Arksine/katapult.git
  • Use this command to install in China
  cd && git clone https://gitee.com/MrCakeFuck/katapult.git
  • Use the following instruction to search for your device ID, and the ID shown in the figure below should appear (note: the ID shown in the figure is for reference only, and each motherboard has a different ID):

    ls /dev/serial/by-id/*
  • To program the firmware, use the following code, and make sure the firmware has been compiled successfully. Please replace <your motherboard ID> with the ID queried in the previous step.

    ~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<your motherboard ID>

For the fast system, use this command to program, please replace <your motherboard ID> with the ID queried in the previous step.

python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<your motherboard ID>

  • Below is a reference:

  • After programming is complete, refer to the following:

Firmware Update

  • Use the following instruction to search for your motherboard ID, and the ID shown in the figure below should appear (note: the ID shown in the figure is for reference only, and each motherboard has a different ID).

    ls /dev/serial/by-id/*
Note

In the figure below, /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 is the motherboard's ID.

  • To update the USB firmware, after compiling the latest firmware, enter the following command to update, please replace <your motherboard ID> with the ID queried in the previous step.

    cd ~/klipper/ && make flash FLASH_DEVICE=<your motherboard ID>

Solution for Incorrect Firmware Burning

  • Power off the motherboard, power on again, and quickly double-click the reset button to re-enter programming mode.
  • Or use the window/host machine to re-burn the katapult firmware burn katapult firmware

Search for USB ID

  1. Open the browser and enter the IP address of the host computer in the address bar, for example, if the IP address of my host computer is 192.168.101.179, simply enter it and press Enter.
  1. Open the WEB interface of the host computer, find in the configuration options on the left sidebar:
  • For fluidd: {…}, click to enter, you can find printer.cfg
  • For mainsail: Machine, click to enter, you can find printer.cfg
  1. Click into printer.cfg, then click DEVICES on the top right
  1. Click SERIAL, then refresh
  • Refresh for fluidd
  • Refresh for mainsail
  1. Copy the ID, click the arrow to copy
  • For fluidd, check whether ttyAMC exists and ensure Path by ID exists, this is the USBID
  • For mainsail, check whether ttyAMC exists and ensure Path by ID exists, this is the USBID

Fill in USB ID

  1. Close DEVICES and fill in the ID
Note
  • Please modify the configuration file as follows:
[mcu] 
serial: /tmp/klipper_host_mcu

to

[mcu host] 
serial: /tmp/klipper_host_mcu
  • Add:
[mcu]
serial: <replace with the ID you just queried>
  • Find [MCU] in fluidd
  • Find [MCU] in mainsail
  1. Fill in the ID in the configuration
tip
  • After filling in the ID, click SAVE & RESTART on the top right
  1. If Klipper prompts ADC out of range, this is a normal phenomenon. Connect the heated bed and thermistor to the motherboard, configure the thermistor pins for the nozzle and heated bed, then save and restart.
dangerous

Note: All IDs mentioned in the document are examples. Each motherboard has a different ID, please fill in the actual obtained ID.


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 -