Install Klipper on BTT CB1 + Manta M8P V2
Set up Klipper firmware on a BTT CB1 compute module mounted on a Manta M8P V2 mainboard. This guide walks through flashing the CB1 SD card image, SSH configuration, compiling and flashing the MCU firmware, building a working printer.cfg, and running a first test print — all in about an hour.
What You Need
Step-by-Step Instructions
-
Step 1 Flash the CB1 SD Card Image
Download the latest CB1 system image from the official BTT GitHub repository (github.com/bigtreetech/CB1/releases). BTT provides two variants: one with the Mainsail web interface pre-installed and one with a minimal image. Choose the Mainsail variant — it includes Klipper, Moonraker, and Mainsail pre-configured so you can skip manual installation of all three services.
The CB1 cannot run standard Raspberry Pi images like MainsailOS or FluiddPi. It requires BTT's custom Debian-based image built for the Allwinner H616 SoC. Write the image to a MicroSD card (16GB or larger, Class 10 minimum) using Raspberry Pi Imager or balenaEtcher. In Raspberry Pi Imager, click "Use Custom" and select the downloaded .img file, then select your MicroSD card and click "WRITE".
Before ejecting the SD card, open the BOOT partition and edit the system.cfg file. Set your WiFi credentials by uncommenting WIFI_SSID="YourNetworkName" and WIFI_PASSWD="YourPassword". If using Ethernet through the M8P's RJ45 jack, you can skip WiFi configuration. Insert the MicroSD into the CB1's card slot, seat the CB1 onto the Manta M8P's SO-DIMM connector, and apply 24V power to the M8P.
Tip: If you cannot find the CB1 on your network after booting, connect a USB-to-UART adapter to the CB1's debug header and check boot logs. The default hostname is BIGTREETECH-CB1 — try pinging bigtreetech-cb1.local if your router supports mDNS. -
Step 2 SSH into the CB1 and Update Klipper
Wait about 90 seconds for the CB1 to boot, then find its IP address in your router's DHCP client list or by pinging bigtreetech-cb1.local. SSH in with the default credentials — username "biqu", password "biqu". Change the default password immediately with the passwd command.
Update the system and Klipper to the latest versions. Run sudo apt update && sudo apt upgrade -y to bring the base OS packages current. Then update Klipper, Moonraker, and Mainsail through the Mainsail web interface (open the CB1's IP address in a browser, navigate to Machine, and click the update buttons) or use KIAUH (Klipper Installation And Update Helper) from the command line.
Disable two services that BTT's image ships with but leaves misconfigured: hostapd (tries to create a WiFi hotspot and fails) and klipper-mcu (GPIO service not configured by default). Run sudo systemctl disable --now hostapd and sudo systemctl disable --now klipper_mcu. This eliminates repeated error log spam and reduces CPU load on the CB1's quad-core Cortex-A53.
Tip: Bookmark the CB1's IP address — you will use the Mainsail web interface constantly. Consider setting a static IP in your router's DHCP settings so the address does not change after a reboot. -
Step 3 Compile and Flash the MCU Firmware
The Manta M8P V2 uses an STM32H723ZET6 MCU that needs Klipper firmware compiled and flashed separately from the CB1 host. SSH into the CB1 and navigate to the Klipper directory: cd ~/klipper.
Run make menuconfig to configure the build. Select the following settings: Micro-controller Architecture = STMicroelectronics STM32, Processor model = STM32H723, Bootloader offset = 128KiB bootloader, Clock Reference = 25 MHz crystal, Communication interface = USB (PA11/PA12) for USB connection or CAN bus (PD0/PD1) if you plan to use CAN with a toolhead board like the EBB36.
Run make clean && make to compile. The output file is ~/klipper/out/klipper.bin. Rename it to firmware.bin and copy it to a FAT32-formatted MicroSD card. Insert the card into the M8P's onboard SD slot (not the CB1's slot) and press the reset button or power cycle. The STM32 bootloader automatically picks up firmware.bin and flashes it. The file is renamed to FIRMWARE.CUR after successful flashing.
Verify the MCU is detected by running ls /dev/serial/by-id/ on the CB1. You should see a device like usb-Klipper_stm32h723xx_XXXX. Copy this full path — you will need it for printer.cfg.
Tip: If /dev/serial/by-id/ is empty after flashing, the firmware was not applied. Double-check that the SD card is FAT32 (not exFAT), the file is named exactly firmware.bin (case-sensitive), and you are using the M8P's SD slot. Try a different SD card — some cards have compatibility issues with the STM32 bootloader. -
Step 4 Configure printer.cfg
Download the reference configuration file for the Manta M8P V2 from the Klipper GitHub repository (config/generic-bigtreetech-manta-m8p-V2_0.cfg) or from BTT's own Manta-M8P repository. Copy this file to ~/printer_data/config/printer.cfg on the CB1, or paste its contents through the Mainsail config editor.
The reference config provides correct pin mappings for all eight stepper drivers, heater outputs, thermistor inputs, fan headers, and endstop connectors on the M8P V2. You must customize it for your specific printer. Start with the [mcu] section — set serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_XXXX using the device path you found in the previous step.
Configure your kinematics (cartesian, corexy, or delta), stepper motor directions, endstop positions, and travel limits. Set your thermistor types for the hotend and heated bed — common values are Generic 3950 for most aftermarket thermistors and ATC Semitec 104NT-4-R025H42G for Slice Engineering thermistors. Define your extruder rotation_distance based on your extruder type (Clockwork2 is approximately 22.67, BMG-style is approximately 7.71).
Add a [bed_mesh] section for automatic bed leveling if your printer has a probe. For BLTouch or inductive probes, add the corresponding [bltouch] or [probe] section with the correct pin from the M8P V2 pin diagram. Save the config and click "Restart" in Mainsail to load it.
Tip: Do not try to configure everything at once. Start with the minimum: MCU serial path, kinematics, one stepper axis, and the heater. Get Klipper to connect without errors, then add components one at a time. Each addition is a save-and-restart cycle. -
Step 5 Optional: Set Up CAN Bus for EBB36 Toolhead
If you are using a BTT EBB36 CAN toolhead board, you need to configure the M8P V2 as a CAN bridge and flash the EBB36 with Klipper firmware. This replaces the long wiring harness to the toolhead with a single 4-wire CAN cable (CANH, CANL, 24V, GND).
First, re-flash the M8P V2 MCU firmware with CAN bus enabled. In make menuconfig, change Communication interface from USB to CAN bus (PD0/PD1) and set the CAN bus speed to 1000000 (1 Mbit/s). Compile and flash using the SD card method from Step 3. The M8P now communicates with the CB1 over its USB connection while simultaneously running a CAN bus network.
Next, flash the EBB36. Connect it to the M8P's CAN header, then use Katapult (formerly CanBoot) or DFU mode to flash Klipper firmware configured for the EBB36's STM32G0B1 MCU with CAN bus at 1000000. After flashing, query the CAN bus: ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0. You should see two UUIDs — one for the M8P and one for the EBB36. Add a second [mcu EBBCan] section in printer.cfg with canbus_uuid set to the EBB36's UUID.
Map the EBB36's pins for your hotend heater, thermistor, part cooling fan, and extruder stepper in printer.cfg using the EBBCan MCU prefix (e.g., pin: EBBCan:PA2).
Tip: CAN bus issues almost always come down to termination resistors or baud rate mismatch. The M8P V2 has a 120-ohm termination resistor jumper — make sure it is enabled. The EBB36 also has one. Both ends of the CAN bus need exactly one 120-ohm termination. Measure 60 ohms between CANH and CANL with a multimeter to confirm. -
Step 6 Verify and Run a First Test Print
Open Mainsail in your browser and check the dashboard. If printer.cfg is correct, the state shows "Ready" with live temperature readings from your hotend and bed thermistors. If you see "MCU not connected" or "Unable to connect", recheck your serial path or CAN UUIDs.
Run initial hardware checks before printing. In the Mainsail console, send STEPPER_BUZZ STEPPER=stepper_x to verify each axis motor moves in the correct direction. If a motor moves the wrong way, invert its dir_pin in printer.cfg by adding or removing the ! prefix. Home all axes with G28 and verify endstops trigger correctly — send QUERY_ENDSTOPS to check their state.
Heat the hotend to your filament's printing temperature and extrude 50mm of filament with G1 E50 F300 to verify the extruder direction and rotation_distance. If it extrudes the wrong amount, measure the actual length and recalculate: new_rotation_distance = old_rotation_distance * (actual_extruded / requested_extruded).
Slice a calibration cube (20x20x20mm) in your slicer of choice — PrusaSlicer, OrcaSlicer, or Cura all support Klipper. Upload the G-code through Mainsail and start the print. Watch the first layer carefully. Use the Mainsail baby-stepping controls (Z offset adjustment) to fine-tune first layer squish in real time. After a successful calibration cube, run PID tuning for the hotend (PID_CALIBRATE HEATER=extruder TARGET=210) and bed (PID_CALIBRATE HEATER=heater_bed TARGET=60) and save with SAVE_CONFIG.
Tip: Always keep a hand on the power switch during your first movements. If a stepper direction is wrong or an endstop does not trigger, the gantry can crash. Klipper's STEPPER_BUZZ command moves only a few millimeters — use it before attempting a full home.
Frequently Asked Questions
Can I use a Raspberry Pi CM4 instead of the BTT CB1 on the Manta M8P?
Yes. The Manta M8P V2 accepts both the BTT CB1 and the Raspberry Pi CM4 in its SO-DIMM socket. The CM4 is more powerful (quad-core Cortex-A72 vs the CB1's Cortex-A53) and can run standard MainsailOS or FluiddPi images. The CB1 is significantly cheaper and uses BTT's custom Debian image with Klipper pre-installed. Both work well for Klipper — the CB1 is adequate for most printers.
Should I use USB or CAN bus to connect the M8P to the CB1?
Use USB (the default) unless you plan to add a CAN toolhead board like the EBB36. USB is simpler to set up and provides reliable communication. CAN bus is only needed when you want to run a CAN network to a remote toolhead, which reduces the wiring harness to 4 wires. You can switch from USB to CAN later by re-flashing the MCU firmware.
Why does Klipper say 'MCU not connected' after flashing?
The most common causes are: the firmware.bin was not actually flashed (check that it was renamed to FIRMWARE.CUR on the SD card), the serial path in printer.cfg does not match the device in /dev/serial/by-id/, or the make menuconfig settings were wrong (especially the processor model or bootloader offset). Re-flash with the correct settings and double-check the serial device path.
What is the difference between MainsailOS, FluiddPi, and the BTT CB1 image?
MainsailOS and FluiddPi are Raspberry Pi OS images pre-loaded with Klipper, Moonraker, and their respective web interfaces (Mainsail or Fluidd). They only run on Raspberry Pi hardware. The BTT CB1 image is a custom Debian build for the CB1's Allwinner H616 SoC that includes the same Klipper stack. You cannot cross-install — the CB1 requires BTT's image.
How do I update Klipper firmware on the M8P after the initial install?
When Mainsail shows a Klipper update is available, update the host software first through the Mainsail Machine page. Then SSH into the CB1, run cd ~/klipper && make menuconfig (verify settings are unchanged), run make clean && make, copy out/klipper.bin to an SD card as firmware.bin, insert it into the M8P, and reset. Both the host and MCU must run the same Klipper version.
Can the BTT CB1 handle input shaping and pressure advance?
Yes. The CB1's quad-core Allwinner H616 at 1.5GHz has more than enough processing power for Klipper's input shaper and pressure advance calculations. For input shaping calibration, you can connect a USB accelerometer (like the ADXL345 on the EBB36) and run Klipper's built-in resonance testing with SHAPER_CALIBRATE. The CB1 processes the accelerometer data and applies the optimal shaper parameters automatically.
What SD card should I use for the CB1?
Use a 16GB or 32GB Class 10 or UHS-I MicroSD card from a reputable brand (Samsung EVO, SanDisk Ultra). Avoid cards larger than 32GB as some may require reformatting to FAT32. Cheap or counterfeit SD cards are the number one cause of random Klipper crashes and corrupted configs. The CB1's eMMC module (available separately) is more reliable for long-term use.