USB to CAN Firmware Flashing
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
- 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
- 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.
:::
- The key
↑
(up arrow) and↓
(down arrow) on the keyboard are used to move the cursor up and down to select menu items. - The confirm key
Enter
or spacebarSpace
is used to check the menu or enter a sub-menu. - The exit key
ESC
is used to return to the previous menu. - The
Q
key is used to exit the Klipper firmware configuration page. - 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
-
Among them,
rm -rf ~/klipper/.config && rm -rf ~/klipper/out
is to delete previous compilation data and firmware.make menuconfig
is for compiling 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 STM32F407 and press Enter
-
Select Bootloader offset, select: 32KiB bootloader
-
Select Communication interface, select: USB to CAN bus bridge (USB on PA11/PA12)
- Press the
Q
key, and Save configuration appears, then pressY
key - Now the configuration should be saved and you should return to the command line interface
- Enter the following command to start compiling, it will take some time
make -j4

-
If the following content is output, the compilation is successful
Linking out/klipper.elf
Creating hex file out/klipper.bin
Confirm Whether It Is in Flashing Mode
- After connecting the mainboard to the host computer with a TypeC data cable, double-click the reset button, and the LED on the mainboard will flash.
- If the LED does not flash, please re-flash the katapult firmware: Flash katapult firmware
- If the LED does not flash, please proceed to the next step after flashing the katapult firmware
- 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 show1d50: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.
You must query the 1d50:6177
device before proceeding to the next step.
Flashing the Firmware
- It is recommended not to find the ID or flash the firmware during the printing process.
- The CAN firmware of the same motherboard or tool board Katapult and the CAN firmware of Klipper have completely consistent IDs.
- Please ensure that the CAN network of the host computer has been configured.
- You can use the following command to search for the CAN ID only when
1d50:606f
appears after runninglsusb
. - The CAN rate of the tool board must be consistent with the host computer, otherwise the ID cannot be found and burned.
-
Execute the following command to query the CANBus UUID:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
Use this command to burn the
fast
system, replace<your motherboard ID>
with the ID queried in the previous step.python ~/klipper/scripts/canbus_query.py can0
-
After inputting, one of the following situations will appear depending on your machine, the following are references:
- First type: The motherboard with the bridge firmware installed will display an ID and prompt
Application: Klipper
- Second type: The motherboard with the bridge firmware installed and the tool board that needs to be burned with firmware will display two IDs
- Third type: Using UTOC with the tool board that needs to be burned
- Tip: UTOC does not display the ID
- Fourth type: No ID prompt, usually because the klipper is occupied, the CAN0 rate of the host computer is incorrect, or there is a wiring anomaly
- First type: The motherboard with the bridge firmware installed will display an ID and prompt
-
Normally, if the tool board that needs to be burned is in the CANBOOT state, it will prompt
Application: CanBoot
and the corresponding firmware light will flash. At this time, you need to burn the Klipper firmware, otherwise it cannot be connected!!! -
Tip: If it is Klipper firmware and the ID has been entered into the configuration, the ID will not be displayed and will be occupied by Klipper. You need to disable the corresponding ID and restart the motherboard completely after cutting off the power.
warning- If the UUID is not queried, please refer to the documentation below.
- CAN Problem Collection
-
Firmware Burning
-
Replace
241696050c56
in the following command with the UUID found in the UUID query, note that there is a space after-u
python3 ~/klipper/lib/canboot/flash_can.py -u 241696050c56
-
As shown in the figure below, if
CAN Flash Success
appears, the burning is successful.
Firmware Update
- If you need to update the firmware, you only need to re-execute the burning instruction after compiling the firmware.
- But please make sure that the corresponding ID can be found or Klipper is already connected.
python3 ~/klipper/lib/canboot/flash_can.py -u <MCU ID>