OpenAMS is an electronics hardware replacement for the AMS, designed to make advanced multi-material 3D printing compatible with Klipper. This repository provides tools for deploying and configuring klipper compatible firmware to your FPS and OpenAMS Mainboards, automating CANBus setup, and integrating with klipper.
OpenAMS setup is divided into two main phases:
- Run this script
asssistant.pyand follow the instructions before installing your boards, it will ask you to plug the FPS and the Mainboard in sequence. Once configured, the wizard to guide you through CANBus setup, UUID detection, and final configuration. - After setup, and a reboot, a systemd daemon (
openams-daemon) runs on the Raspberry Pi to automatically detect CANBus UUIDs, configure Klipper, and ensure the system is ready to use.
- Automated environment setup (Python virtualenv, dependencies)
- System package installation (build tools, dfu-util, etc.)
- Cloning and updating Katapult and Klipper repositories
- Automatic detection of printer mode (canbus/bridge)
- Automated build and flashing of firmware
- STM32 option bytes configuration (Linux, Windows, WSL)
- USB device handling for WSL/Windows
- Automated CANBus network configuration
- Assistant wizard for guided setup (Raspberry Pi only)
- Systemd daemon for automatic UUID detection and Klipper configuration
- Linux (or WSL/Windows with additional steps)
- Python 3.7+
sudoprivileges for installing system packages and flashing- For the assistant: Raspberry Pi running Klipper
-
Clone this repository (if you haven't already):
git clone <repo-url> cd openams_cli
-
Start the interactive assistant (on the Raspberry Pi) to guide you through the full hardware and firmware setup:
python3 assistant.py
- The assistant will walk you through firmware flashing, environment setup, CANBus configuration, and UUID detection.
- All actions are logged to
/var/log/openams_assistant.log.
-
Automated UUID detection and Klipper configuration
After the initial setup, the assistant will install and enable a systemd daemon (openams-daemon) that, after a reboot:- Waits for both FPS and Mainboard CANBus UUIDs to appear.
- Automatically configures Klipper macros and config files.
- Restarts Klipper and prints a summary.
- This daemon runs automatically on reboot and ensures your system is always ready.
This is the bare (non-assisted) script tht can be used to flash the boards manually, setup canbus, and configure klipper, without the assistants help. The script can also be run on Windows (under WSL) or just plain linux (x86) to flash firmware to the FPS, the OpenAMS Mainboard, and coming soon the OpenAMS 2 Mainboard.
- Installs all required system and Python dependencies.
- Sets up a Python virtual environment at
~/.openams_env. - Should be run first on any system before using other commands.
- Configures CANBus networking on the system (systemd-networkd, udev rules, etc.).
--non-interactive: Skips user prompts for automated setup (recommended for assistant use).
- Flashes firmware to the selected board.
--board fps: Programs the Filament Pressure Sensor board.--board openams: Programs the OpenAMS Mainboard.--mode bridge|canbus: (FPS only) Selects the firmware mode.
- Queries the CANBus network for Klipper devices and displays their UUIDs.
- Guides you through configuring Klipper macros and config files using detected UUIDs.
- Installs and enables the OpenAMS Assistant systemd service on the Raspberry Pi.
- This is typically called automatically by the assistant after setup.
- (Raspberry Pi only)
Launches the interactive assistant wizard for guided setup of OpenAMS hardware and CANBus integration. - Installs and enables the
openams-daemonsystemd service for ongoing automation.
openams_cli.py— Main CLI tool for board programming and configuration (Linux x86/Windows x86 or RPi).assistant.py— Interactive wizard for guided setup (Raspberry Pi only).openams_daemon.py— Daemon for automatic UUID detection and Klipper configuration (runs as a systemd service).firmwares/— Prebuilt firmware binaries for OpenAMS Mainboard.LICENSE— License file (All rights reserved).
- On first run, a Python virtual environment will be created at
~/.openams_env. - System dependencies will be installed via
apt(requires sudo). - For WSL/Windows users, the script will attempt to automate USB device attachment using
usbipd-win. - All build artifacts and cloned repositories are placed in your home directory (
~/katapult,~/klipper). - The assistant and daemon scripts are installed to
/usr/local/binand managed as systemd services for persistent automation. - All logs are available at
/var/log/openams_assistant.log.
- If you encounter permission errors, ensure you are in the
dialoutgroup and havesudoaccess. - For WSL/Windows, ensure
usbipd-winandSTM32CubeProgrammerare installed on Windows. - If the script cannot find your STM32 device, check your USB cable and that the device is in DFU mode.
- If CANBus is not detected, verify cabling and termination resistors as described in the CANBus setup output.
Q: Can I use the assistant on my desktop PC?
A: No, the assistant (assistant.py) is intended only for the Raspberry Pi running Klipper. Use openams_cli.py on your desktop for board programming.
Q: What happens if I re-run the assistant?
A: The assistant is safe to re-run and will guide you through the setup steps again. It will not overwrite existing configuration files without confirmation.
Q: How do I update the system after a firmware or config change?
A: Re-run the assistant or the relevant CLI commands. The daemon will ensure Klipper is reconfigured and restarted as needed.
See LICENSE in this repository.
All rights reserved.