Sdl - Katapult/Klipper SD Card Firmware Load Utility

I just put up a script for loading Katapult/Klipper onto an SD Card for updating the firmware of a main controller board.

I know there are other ways, tools and instructions for doing this but I wanted to have something that automates the tasks needed for preparing/loading the SD card, prioritized Katapult over Klipper and is reasonably fast and stable.

The script is run from GitHub using curl, so there’s nothing to download - just copy the statement into your clipboard and paste it into the SSH terminal and press Enter.

As there are a number of different published ways of doing this task, I’m not sure how necessary it is, but I think it’s a useful general tool for putting a firmware image on an SD card and worth sharing.

You know, with the way that the “bigger” 3d printing manufacturers (Creality, BTT, Mellow Fly and the copies) all tend to copy the existing hardware setup with minor variation; it makes me wonder if it would be possible to nudge them in a new direction to make setting up Klipper easier.

I think an “ideal” situation would be like the newer Printers/Mainstream IoT (Nest/Ring etc) do it.

Have a script on the Pi (or equivalent) host it’s own website via it’s Wifi when there is no existing configuration, put a QR code on the printer/board, user scans QR code with their phone and it leads them to the hosted website to fill in their Wifi information to link their printer to their home wifi.

Then it could source and download the newest Klipper itself.

To the point about the manufacturers, if there was a way to nudge them towards having a “default” progam on mcu boot that just tells Klipper the basic information.

In other words. Once the QR code section is done, Pi reboots (just to make sure everything is good), when it comes back up it auto runs a script looking for anything connected via USB/CAN/UART and sends a basic handshake protocol. Anything that isn’t a 3D printer board/toolhead won’t respond or won’t respond correctly.

The others will reply to Klipper with a basic

"Hey! I’m an mcu waiting to run Klipper. Here’s what I am:

  • Processor: STM32F103
  • Frequency: 72 Mhz
  • Bootloader Start Address: 0x8000000
  • Flash size: 1024K
  • Communications Protocol: CANBus
  • Communication Pins: CANH:GPIO1, CANL:GPIO2
  • Additional Pins: Status LED: GPIO14
    "

Klipper acknowledges, builds the correct firmware and flashes immediately and moves on to the next board if there is any.

Obviously there are some hurdles to handle there, but wouldn’t life be so much easier?

2 Likes