USB Bridge CAN Firmware Flashing
Firmware Compilation Quick Guide
Notes
- Network: Ensure the host machine (Raspberry Pi, etc.) is connected to the network.
- Login Method: Must use SSH to log in via the network; disable serial port.
- Input Method: Keep the keyboard in English half-width mode.
SSH Login and User Switching
Use tools like MobaXterm, PuTTY, etc., to SSH into the host machine.
Switching Users:
- Standard Systems (Raspberry Pi official system, etc.)
Do not useroot. Switch to a regular user:su <username> - FLY Host Machine (FlyOS-FAST system)
Only supports logging in as therootuser (password:mellow).
Firmware Compilation Operation Guide
In the Klipper firmware configuration interface, only keyboard operations are supported; mouse usage is not possible.
| Key | Function |
|---|---|
| ↑ / ↓ | Move the cursor up/down to select menu items |
| Enter / Space | Confirm selection, toggle options, or enter submenus |
| ESC | Return to the previous menu |
| Q | Exit the configuration interface |
| Y | When exiting, press Y if prompted to save the configuration |
Start Firmware Compilation
The following describes 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 -
Here,
rm -rf ~/klipper/.config && rm -rf ~/klipper/outdeletes the previous compilation data and firmware. -
make menuconfigis for compiling the firmware. After execution, the interface below should appear:Loading... -
Select Enable extra low-level configuration options and press Enter.
Loading... -
Navigate to the Micro-controller Architecture menu and select STMicroelectronics STM32, then press Enter.
Loading... -
Go to the Processor model menu, select STM32F405, and press Enter.
Loading... -
Select Bootloader offset and choose: 32KiB bootloader.
Loading... -
Select Communication interface and choose: USB to CAN bus bridge (USB on PA11/PA12).
-
As shown in the image, select CAN bus interface (CAN bus (on PB8/PB9)) --->.
Loading...
- Press the
Qkey. When Save configuration appears, press theYkey.Loading... - The configuration should now be saved, and you will exit to the command line interface.
- Enter the command below to start the compilation. This process may take some time.
make -j4
- The compilation is successful if the following content is output.
- Due to Klipper version differences, the appearance of
out/klipper.binindicates success.Linking out/klipper.elf
Creating bin file out/klipper.bin
Firmware Flashing
Execute the following command to flash the firmware
fly-flash -d auto -h -f /data/klipper/out/klipper.bin
Search for CAN ID
- Open a browser, enter the IP address of the host computer in the address bar. For example, if the host IP is
192.168.101.179, simply type it in and press Enter.
- Open the WEB interface of the host computer. In the configuration options on the left sidebar, find:
Loading... |
Loading... |
-
Click
printer.cfgto enter, then clickDEVICESin the upper right corner.Loading...Loading... -
Click
CAN, then refresh.- Refresh in fluidd
Loading...- Refresh in mainsail
Loading... -
Copy the ID. Click the indicated arrow to copy.
- In fluidd, ensure the first arrow points to
Klipper. If yes, click the arrow on the right to copy.
Loading...- In mainsail, ensure the first arrow points to
Klipper. If yes, click the arrow on the right to copy.
Loading... - In fluidd, ensure the first arrow points to
Fill in the CAN ID
- Close
DEVICESand fill in the ID.
- In the configuration file, change:
[mcu]
serial: /tmp/klipper_host_mcu
to:
[mcu host]
serial: /tmp/klipper_host_mcu
- Add:
[mcu]
canbus_uuid: <Replace here with the ID you just queried>
Loading... |
Loading... |
- Fill the ID into the configuration.
- After filling in the ID, click
SAVE & RESTARTin the upper right corner.
Loading... | Loading... |
- If Klipper prompts
ADC out of range, this is normal. Connect the heated bed and thermistor to the mainboard, configure the thermistor pins for the nozzle and heated bed, then save and restart.
Note: All IDs appearing in this document are examples. The actual ID for each mainboard is different. Please fill in the ID you actually obtained.