SkillAgentSearch skills...

KlipperWrt

A guide to install Klipper with fluidd, Mainsail or Duet-Web-Control and webcam stream in OpenWrt. Mainly created around the Creality Wi-Fi box but any OpenWrt running device with similar specs will work just fine.

Install / Use

/learn @ihrapsa/KlipperWrt
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Please follow ShivaJiva's fork for up to date releases and support

KlipperWrt


A guide to get Klipper with fluidd, Mainsail or Duet-Web-Control on OpenWrt embeded devices like the Creality Wi-Fi Box.


Before starting...

<details> <summary>Click to expand!</summary>

Why Klipper on a Router :question:

<details> <summary> ( :red_circle: Click to expand!)</summary>
  • OpenWrt is so much more efficient than other linux distros.
  • On a single core 580MHz cpu (with moonraker, klippy, nginx and mjpg-streamer) I get ~20-25% cpu load while idle/not printing and max 35-40% cpu load while printing and watching stream (640x480 30fps mjpeg).

alt text alt text alt text
alt text
alt text

  • I've tried octoprint on this box as well but unfortunately it was too resource intensive. Test prints speak for themselves.
</details>

What is the Creality Wi-Fi Box?

<details> <summary>(Click to expand!)</summary>

creality_wb

  • A router box device released by Creality in 2020 meant to add cloud based remote control to your printer. Creality Cloud App is a contraption between social media and 3d printing that you have to use to be able to print and monitor.

    Sounded like a good ideea. Unfortunately, the unpolished idea was not very well received by the public. Creality recently (July 2021) added Cura integration and custom gcode upload. Webcam support finally got released but it seems to only work with their new proprietary webcam. Everything is still cloud based and you can't use it offline. This raised a lot of concerns in terms of privacy and transparency. Putting all your trust in a company is not necesarily the best idea and although they seemed to have improved the app and user experience the full control is not in the user's hands yet.

    It's hard to please everybody when creating a product/service but actually listening to the public's feedback is a good start. People need privacy, full control and reliability to actually consider using the product over the alternatives. Klipper and it's UI clients come as open source and 100% transaprent alternatives to remote printing.

<details> <summary>Specifications (Click to expand!)</summary>

(taken form figgyc's commit)

  • SoC: MediaTek MT7688AN @ 580 MHz

  • Flash: BoyaMicro BY25Q128AS (16 MiB, SPI NOR)

  • RAM: 128 MiB DDR2 (Winbond W971GG6SB-25)

  • Peripheral: Genesys Logic GL850G 2 port USB 2.0 hub

  • I/O: 1x 10/100 Ethernet port, microSD SD-XC Class 10 slot, 4x LEDs, 2x USB 2.0 ports, micro USB input (for power only), reset button

  • FCC ID: 2AXH6CREALITY-BOX

  • UART: test pads: (square on silkscreen) 3V3, TX, RX, GND; default baudrate: 57600

    </details>
</details>

What is OpenWrt?

<details> <summary>(Click to expand!)</summary>

OpenWrt

  • A Linux OS built for embeded devices, routers especially. Light, Open Source with a great community and <br> packages that gives your device the freedom it deserves.
</details>

What is Klipper?

<details> <summary>(Click to expand!)</summary>

Klipper

  • A 3d-printer firmware. It runs on any kind of computer taking advantage of the host cpu. Extremely light on cpu, lots of feautres
</details>

What is fluidd / mainsail?

<details> <summary>(Click to expand!)</summary>

fluidd mainsail

  • These are free and open-source Klipper web interface clients for managing your 3d printer.
</details>

What is Moonraker?

<details> <summary>(Click to expand!)</summary>

Moonraker

  • A Python 3 based web server that exposes APIs with which client applications (fluidd or mainsail) may use to interact with Klipper. Communcation between the Klippy host and Moonraker is done over a Unix Domain Socket. Tornado is used to provide Moonraker's server functionality.
</details>

What is duet-web-control

<details> <summary>(Click to expand!)</summary>

dwc

  • Duet Web Control is a fully-responsive HTML5-based web interface for RepRapFirmware. Stephan3 built a socket to make it communicate with klipper as well (klipper is not a RepRapFirmware). This is a standalone webserver and client interface - so no need for moonraker or nginx.
</details> </details>

:clapper: Check out the video tutorial Kruze17 has made on his Hyper Makes YouTube channel.

:exclamation: Open issues or join the <img align="center" width="30" height="30" src="https://github.com/ihrapsa/KlipperWrt/blob/main/img/discord.png" alt="discord_icon"> server for extra support.


Automatic Steps:

<details> <summary>Click to expand!</summary>

Installing Script method

Installs everything fresh and up to date. Possibly unstable, sometimes new dependencies are added and I might not have updated the script by then.

<details> <summary>Click for STEPS!</summary>

This method uses 2 scripts to foramt an sd card and make it extroot and another one that installes everything from the internet.

STEPS:

  • Make sure you've flahsed/sysupgraded latest .bin file from /Firmware/OpenWrt_snapshot/ or from latest release.
  • Connect to the OpenWrt access point
  • Access LuCi web interface and log in on 192.168.1.1:81
  • (optional but recommended) Add a password to the OpenWrt access point: Wireless -> Under wireless overview EDIT the OpenWrt interface -> Wireless Security -> Choose an encryption -> set a password -> Save -> Save & Apply
  • (optional but recommended) Add a password: System -> Administration -> Router Password
  • ❗If your home network subnet is on 1 (192.168.1.x), in order to avoid any ip conflicts, change the static ip of the box LAN from 192.168.1.1 to something like 192.168.3.1. To do that access the luci webinterface -> Network -> Interfaces and edit the static ip -> Save -> press the down arow on the Save&Apply button -> Apply Unchecked. You can now access luci on the new ip and continue configureing Client setup.
  • Connect as a client to your Internet router: Network -> Wireless -> SCAN -> Join Network -> check Lock to BSSID -> Create/Assign Firewall zone then under custom type wwan enter -> Submit -> Save -> Save & Apply
  • Connect back to your router and either find the new box's ip inside the DHCP list.
  • ❗ Access the terminal tab (Services -> Terminal) ❗ If terminal tab is not working go to Config tab and change Interface to the interface you are connecting through the box (your wireless router SSID for example) -> Save & Apply.
  • Download and execute the 1_format_extroot.sh script:
cd ~
wget https://github.com/ihrapsa/KlipperWrt/raw/main/scripts/1_format_extroot.sh
chmod +x 1_format_extroot.sh
./1_format_extroot.sh
  • You'll be prompted to reboot: type reboot

  • Download and execute the 2_script_manual.sh script:

cd ~
wget https://github.com/ihrapsa/KlipperWrt/raw/main/scripts/2_script_manual.sh
chmod +x 2_script_manual.sh
./2_script_manual.sh
  • Follow the prompted instructions and wait for everything to be installed

  • remove the scripts when done: rm -rf /root/*.sh

  • Done!

  • When done and rebooted use http://openwrt.local or http://box-ipto access the Klipper client

  • Done!

Setting up your printer.cfg

  • put your printer.cfg inside /root/klipper_config

  • delete these blocks from your printer.cfg: [virtual_sdcard], [display_status], [pause_resume] since they're included inside fluidd.cfg/ mainsail.cfg

  • add these lines inside your printer.cfg depending on your klipper client (mainsail/fluidd):

  • Fluidd: [include fluidd.cfg] [include timelapse.cfg]

  • Mainsail: [include mainsail.cfg] [include timelapse.cfg]

  • Under [mcu] block change your serial port path according to this[Optional]

  • Build your klippper.bin mainboard firmware using a linux desktop/VM (follow printer.cfg header for instructions)

  • Flash your mainboard according to the printer.cfg header

  • Do a FIRMWARE RESTART inside fluidd/Mainsail

  • Done


Notes:

  • If the
View on GitHub
GitHub Stars195
CategoryProduct
Updated27d ago
Forks39

Languages

Shell

Security Score

85/100

Audited on Mar 6, 2026

No findings