Software
All the Klipper/Mainsail/other 3D printer software was installed using the "kiauh" helper tool, which can be launched on the Raspberry Pi by running the command ~/kiauh/kiauh.sh
Klipper
Klipper is the firmware and software responsible for running the 3D printer. It is different from traditional 3D printer firmware in that it has two components: a firmware that runs on the microcontroller of the BTT Octopus board, and a software that runs on a Raspberry Pi computer. With most firmwares, such as Marlin, g-code instructions are sent directly to the microcontroller, which are then processed into stepper motor movement commands. With Klipper, this processing is done on the much more powerful Raspberry Pi, which then sends the stepper motor commands to the microcontroller which executes them.
Klipper is configured to use Mainsail as its web interface
KIAUH
Klipper, Mainsail, and the backup addon are managed using the KIAUH program. Its GUI can be opened by running ~/kiauh/kiauh.sh
Configuration File
The printer.cfg
and other important files are automatically backed up after every change to this GitHub repo using Klipper-Backup, which was installed using kiauh. The access token for it is stored alongside the password for the "Printer Bookstack" Bookstack account.
Configuration Template
The Octopus board comes with a configuration file template for an Octopus v1.1 / Voron 2.4 / Klipper combo design. This can be found here. Only use as a general guide because it does not exactly match our printer setup.
Crowsnest Webcam Streamer
As Klipper/Moonraker/Mainsail is a modular, minimalist 3D printer control system, it does not have built-in support for webcam streaming. To add webcam streaming support, Crowsnest was installed via kiauh that take a USB webcam input and stream it via a web socket that Mainsail will automatically detect.
Useful Klipper Features
The greater computing power of the Raspberry Pi allows many more printer features to be implemented, such as input shaping. Below are some references for Klipper features that could be useful:
- List of included input shapers
- List of supported G-code commands; includes some Klipper-exclusive ones.
Mainsail Web Interface
The Klipper software comes with no user interface of its own. Originally, it was designed to work with OctoPrint, but for our purposes a more streamlined solution is preferable. Currently, Klipper is configured to use Mainsail, a web-based user interface running on the Raspberry Pi that allows remote access over the internet, easier configuring of Klipper, live camera views, and more. It is accessible by connecting to the same network as the Raspberry Pi and using a web browser to connect to the Pi's IP address (using default port 80).
Config Changes
Misc. Raspberry Pi Notes
This page covers some small, miscellaneous notes about the Raspberry Pi software.
Raspberry Pi OS
The Pi is running PiOS 12 Bookworm. SSH is enabled on the Pi, with the following login info:
USERNAME: printer
PASSW0RD: PrintMeBaby
Internet Access via UBIT
The Raspberry Pi is connected to the internet via either Ethernet or the UB_Devices WiFi network. Since upgrading to a Raspberry Pi 4 which has dual-band WiFi, it can be connected to UB_Devices and host the below WiFi hotspot simultaneously.
Automatic WiFi Hotspot
Because the printer is controlled though the Mainsail web interface, an easy way to connect to the Pi's network is needed. Because the U.B. internet isolates devices for security, the Pi is configured to automatically create a WiFi hotspot on startup. This was done using this script. The default gateway when connected to wifi is 10.0.0.5
. For now, the default hotspot name and password are used:
SSID: AccessPopup
Pass: 1234567890
GPIO Power Switch
The Pi can be configured to use a GPIO pin as a power button to shutdown and boot the system. Some details can be found here, but to summarize, a line is added to /boot/config.txt
that reads dtoverlay=gpio-shutdown
. By default, this will cause GPIO3 (physical pin 5) to shutdown the Pi when pulled low. This is very useful for preventing corruption when needing to power off the Pi without access to a terminal to issue a shutdown command.
Companion Windows PC
This PC runs a copy of Windows 11 IoT LTS. It is configured with a custom Cura profile and many useful utilities for using the 3D printer. It is connected to UB's internet via an Ethernet cable, and can connect to the Raspberry Pi's WiFi hotspot in order to access the Mainsail web interface.
The Windows login credentials are:
User: Printer
Pass: Printer2025