Skip to main content

Connecting Klipperr

Note
  • This tutorial is for flashing the KLIPPER firmware onto the Fly-Buffer-Plus buffer board
  • After flashing, the pressure sensor firmware pins will be overwritten
  • To restore previous functionality, you must either write your own macros or re-flash the previous firmware
  • Any configuration and macros used must be written by yourself

Flashing the Bootloader

Entering Flash Mode

  • There are two methods to enter flash mode
  • First method: With the tool board completely powered off, press and hold the BOOT button, then connect one end of a data-capable TYPE-C cable to the mainboard and the other end to your device
  • Second method: After connecting one end of a data-capable TYPE-C cable to the mainboard and the other end to your device, hold down the BOOT button, then press the RST button, release the RST button, and finally release the BOOT button

Flashing the Firmware

  • Bootloader firmware for the buffer board
    • Click the download link below
  • Loading...
Note
  • USB3.0 may fail to flash, please try to use the computer's USB2.0 for flashing
  • If flashing still fails, please try using the host computer to flash
  • If the following error appears, please use a USB hub
  1. Flashing tool Download Link
  2. Please download SetupSTM32CubeProgrammer and STM32 DFU driver
  3. Download the firmware to any directory on your computer
  4. Connect the main board to the computer using a Type-C cable, and ensure it has entered dfu flashing mode
  5. In STM32CubeProgrammer, select USB mode, then refresh and connect
  6. If no error pop-up appears, the connection is successful.
    Warning

    If the following screen appears, it indicates a computer or software issue. Please flash using the host computer: Host Computer Flashing Tutorial

  7. Click the download icon on the left and select the options below
  8. Click the Browse button as indicated by the arrow, then select the firmware you need to flash
  9. Select Start address and enter 0x08000000
    • Please note, if the firmware is in HEX format, please skip this step!!
  10. Click Start automatic mode at the bottom to begin flashing the firmware
  11. The following prompt indicates that the firmware flashing is complete

USB Firmware Compilation

Starting the Compilation

  • A host computer with the klipper service installed is required Connect via SSH over the network
  • And the device is connected to the host computer
  • Note: Please use a regular host computer, such as Raspberry Pi FLY. If it is a modified host computer (such as a WiFi stick, Redmi, etc.), due to too many issues, we cannot provide technical support
warning
  • Notes on FlyOS-Armbian system and general system
    • Ordinary host computer systems such as Raspberry Pi, FLY are viewed in this category
    • Do not use the ROOT user for any operations on these host computers
    • Please use a normal user for operations
    • To switch users, for FlyOS-Armbian system use the su fly command to switch to a normal user
    • For other systems, use the su <your host computer username> command to switch to a normal user
    su <your host computer username>

::: tip

  • Please ensure that the host machine can connect to the network normally.
  • Before compiling the firmware, use SSH to log in to the host machine via the network.
  • Do not use a serial port tool to log in to the host machine.

:::

Klipper Firmware Compilation and Configuration Page Operation Instructions

::: tip

Please make sure that the keyboard input method is in half-width mode, i.e., English mode.

:::

  1. The key (up arrow) and (down arrow) on the keyboard are used to move the cursor up and down to select menu items.
  2. The confirm key Enter or spacebar Space is used to check the menu or enter a sub-menu.
  3. The exit key ESC is used to return to the previous menu.
  4. The Q key is used to exit the Klipper firmware configuration page.
  5. When exiting the Klipper firmware configuration page and there is a prompt, press the Y key to save the configuration file.

::: warning

If there are fewer options in the configuration page, please first check [ ] Enable extra low-level configuration options to display some hidden 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, you will see Save configuration, then press the Y key
  • At this point, the configuration should be saved and you will exit to the command line interface
  • Enter the following command to start the compilation, which may take some time
make -j4
  • If the compilation is successful, the final output will be as follows

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

Entering Flash Mode

Warning
  • Double press the RST button to enter flash mode

Confirming 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 the Firmware

tip
  • Internet connection is required when installing the flashing plugin. Please ensure your host machine is properly connected to the internet.
  • If already installed, there is no need to install again.

Start Flashing

Warning
  • For non-fly host machines, please execute the code below to install the required dependency packages for firmware flashing! Otherwise, the firmware cannot be flashed!

    cd && git clone https://github.com/Arksine/katapult.git
  • Use the command below to search for your device ID. The ID shown in the figure below should appear (Note: The ID shown in the figure is for reference only; each motherboard has a unique ID).

    ls /dev/serial/by-id/*
  • Use the code below to flash the firmware. Please ensure the firmware has already been compiled, and replace <你的主板ID> with the ID obtained in the previous step.

~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<你的主板ID>
  • Reference image is shown below:

  • Reference after flashing is completed:

Firmware Update

  • Use the following command to search for your motherboard ID. The ID shown in the figure below should appear (Note: The ID shown in the figure is for reference only; each motherboard has a unique ID).

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

The ID /dev/serial/by-id/usb-katapult_rp2040_E662549553642032-if00 in the figure below is the motherboard ID.

  • After compiling the latest firmware, use the command below to update the USB firmware. Please replace <你的主板ID> with the ID obtained in the previous step.

    cd ~/klipper/ && make flash FLASH_DEVICE=<你的主板ID>

Recovery Method for Incorrect Firmware

  • Power off the motherboard, then power it on again and double-press the reset button quickly to re-enter flashing mode.
  • Alternatively, use Windows/host machine to re-flash the Katapult firmware Flash Katapult Firmware

Search for CAN ID

  1. Open a 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, and in the configuration options of the left sidebar, find:
  • For fluidd: {…}, click into it to find printer.cfg
  • For mainsail: Machine, click into it to find printer.cfg
  1. After clicking into printer.cfg, click on DEVICES in the upper right corner.

  2. Click CAN, then refresh.

    • Refresh in fluidd
    • Refresh in mainsail
  3. Copy the ID; click the arrow to copy it.

    • In fluidd, confirm whether the item pointed to by the first arrow is Klipper; if so, click the arrow on the right to copy it.
    • In mainsail, confirm whether the item pointed to by the first arrow is Klipper; if so, click the arrow on the right to copy it.

Fill in CAN ID

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

to

[mcu host] 
serial: /tmp/klipper_host_mcu
  • Add:
[mcu]
canbus_uuid: <Replace this with the ID you just looked up>
  • In fluidd, find [MCU]
  • In mainsail, find [MCU]
  1. Fill the ID into the configuration
tip
  • After filling in the ID, click SAVE & RESTART in the upper right corner.
  1. If Klipper shows a message ADC out of range, this is normal. Connect the heated bed and thermistor to the mainboard, and configure the thermistor pins for the extruder and heated bed, then save and restart.
dangerous

Note: All IDs shown in the documentation are examples. Each mainboard has a different ID, so please fill in the actual ID you obtained.


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