USB Bridge CAN Firmware Flashing
SSH Connect to the Host
- Before compiling the firmware, you need to
connect to the host via WiFi SSH.
- First, please: Use WiFi to Connect to Host SSH
- USB Bridge CAN Firmware Flashing
- Manually Compile USB Bridge CAN Firmware
USB Bridge CAN Firmware Flashing
- A pre-compiled USB Bridge CAN firmware is already available in the FLYOS-FAST system. Manual firmware compilation is not required; you can flash it by executing the commands below.
- Alternatively, you can choose to
manually compile the USB Bridge CAN firmware.
-
The FAST system defaults to a 1M baud rate. If 500K is needed, modify the
canbus_bitratein the system configuration. -
This command flashes the
1MUSB Bridge CAN firmware:
fly-flash -d auto -h -f /usr/lib/firmware/klipper/stm32f407-32k-usbcan-1m.bin
- This command flashes the
500kUSB Bridge CAN firmware:
fly-flash -d auto -h -f /usr/lib/firmware/klipper/ststm32f407-32k-usbcan-500k.bin
Firmware Compilation Quick Guide
Important Notes
- Network: Ensure the host machine (Raspberry Pi, etc.) is connected to the network.
- Login Method: Must log in via SSH over the network; serial port login is disabled.
- 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 cannot be used.
| Key | Function |
|---|---|
| ↑ / ↓ | Move cursor up/down to select menu items |
| Enter / Space | Confirm selection, check options, or enter submenus |
| ESC | Return to the previous menu |
| Q | Exit the configuration interface |
| Y | When exiting, press Y to save configuration if prompted |
Start Firmware Compilation
The following describes how to compile the firmware:
-
After connecting via SSH, enter the following command and press Enter:
cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig -
Among these,
rm -rf ~/klipper/.config && rm -rf ~/klipper/outdeletes previous compilation data and firmware. -
make menuconfigis for compiling the firmware. After execution, the following interface should appear:Loading... -
Select Enable extra low-level configuration options and press Enter.
Loading... -
Enter the Micro-controller Architecture menu, then select STMicroelectronics STM32 and press Enter.
Loading... -
Enter the Processor model menu, select STM32F407, and press Enter.
Loading... -
Select Bootloader offset, choose: 32KiB bootloader.
Loading... -
Select Communication interface, choose: USB to CAN bus bridge (USB on PA11/PA12).
Loading...
- Press the
Qkey, then Save configuration appears. At this point, press theYkey.Loading... - The configuration should now be saved, and you should have exited back to the command line interface.
- Enter the following command to start compilation. This will take some time.
make -j4
- If the following content is output at the end, the compilation is successful.
- Due to Klipper version differences, the appearance of
out/klipper.binalone indicates success.Linking out/klipper.elf
Creating bin file out/klipper.bin
Firmware Flashing
Execute the command below to flash the firmware.
fly-flash -d auto -h -f /data/klipper/out/klipper.bin
Search for CAN ID
- 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.
- Open the WEB interface of the host computer, and in the configuration options of the left sidebar, find:
Loading... |
Loading... |
-
After clicking into
printer.cfg, click onDEVICESin the upper right corner.Loading...Loading... -
Click
CAN, then refresh.- Refresh in fluidd
Loading...- Refresh in mainsail
Loading... -
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.
Loading...- 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.
Loading... - In fluidd, confirm whether the item pointed to by the first arrow is
Fill in CAN ID
- Close
DEVICESand fill in the ID
- 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>
Loading... |
Loading... |
- Fill the ID into the configuration
- After filling in the ID, click
SAVE & RESTARTin the upper right corner.
Loading... | Loading... |
- 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.
Note: All IDs shown in the documentation are examples. Each mainboard has a different ID, so please fill in the actual ID you obtained.