This gist is no longer maintained. Please visit d4rk50ul1's repo instead
This gist is no longer maintained. Please visit d4rk50ul1's repo instead
This gist is no longer maintained. Please visit d4rk50ul1's repo instead
Consider everything below to be outdated
- A rooted Android device.
- Linux Deploy app: https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
- XServer app: https://play.google.com/store/apps/details?id=x.org.server
- Init scripts for Klipper and Moonraker (in this gist).
- XTerm script for KlipperScreen (in this gist).
-
Install Linux Deploy.
-
Install XServer XSDL.
-
Create a container within Linux Deploy using the following settings:
- Bootstrap:
- Distro:
Debian
(buster) - Installation type:
Directory
Note: You can chooseFile
but make sure it's large enough as you can't resize it later and 2 GB is not enough. - Installation path:
/data/local/debian
Note: You can choose a different location but if it's within${EXTERNALDATA}
then SSH may fail to start. - User name:
android
Note: You can choose something else if you make sure to update the scripts in this gist accordingly.
- Distro:
- Init:
- Enable:
yes
- Init system:
sysv
- Enable:
- SSH:
- Enable:
yes
- Enable:
- GUI:
- Enable:
yes
- Graphics subsystem:
X11
- Desktop environment:
XTerm
- Enable:
- Bootstrap:
-
SSH into the container.
-
Install Git and KIAUH:
sudo apt install git git clone https://github.com/th33xitus/kiauh.git
-
Install Klipper, Moonraker, Mainsail (or Fluidd), and KlipperScreen:
kiauh/kiauh.sh
Note: KlipperScreen in particular will take a very long time (tens of minutes).
-
Find your printer's serial device for use in Klipper's
printer.cfg
:
It will likely be/dev/ttyACM0
or/dev/ttyUSB0
. Check if either of those appear/disappear under/dev/
when plugging/unplugging your printer.If you cannot find your printer in
/dev/
, then you can install the Octo4a app which includes a custom implementation of the CH34x driver. You don't need to run OctoPrint within it, but you will need to run the Octo4a app. To do this:- Install Octo4a from https://github.com/feelfreelinux/octo4a/releases
- Run Octo4a and let it install OctoPrint (optionally tap the Stop button once it's done installing).
- Make sure Octo4a sees your printer (it will be listed with a checked-box next to it).
- Install Termux from https://f-droid.org/en/packages/com.termux
- Run Termux and find the serial device created by Octo4a:
You should see that
pkg install tsu sudo ls -al /data/data/com.octo4a/files/serialpipe
/data/data/com.octo4a/files/serialpipe
is a link to/dev/pts/0
or similar. Whatever it's linked to is the serial port you should use inprinter.cfg
. You can uninstall Termux after this as it's not needed for anything else.
-
Make the serial device accessible to Klipper:
sudo chmod 777 /dev/ttyACM0 # or sudo chmod 777 /dev/ttyUSB0 # or sudo chmod 777 /dev/pts/0
-
Install the init and xterm scripts from this gist:
sudo wget -O /etc/default/klipper https://gist.github.com/RyanEwen/ae81fc48ad00397f1026915f0e6beed9/raw/58f2834497b2733c03ca42c9bf41b2b3d79d9319/etc_default_klipper sudo wget -O /etc/init.d/klipper https://gist.github.com/RyanEwen/ae81fc48ad00397f1026915f0e6beed9/raw/58f2834497b2733c03ca42c9bf41b2b3d79d9319/etc_init.d_klipper sudo wget -O /etc/default/moonraker https://gist.github.com/RyanEwen/ae81fc48ad00397f1026915f0e6beed9/raw/58f2834497b2733c03ca42c9bf41b2b3d79d9319/etc_default_moonraker sudo wget -O /etc/init.d/moonraker https://gist.github.com/RyanEwen/ae81fc48ad00397f1026915f0e6beed9/raw/58f2834497b2733c03ca42c9bf41b2b3d79d9319/etc_init.d_moonraker sudo wget -O /usr/local/bin/xterm https://gist.github.com/RyanEwen/ae81fc48ad00397f1026915f0e6beed9/raw/58f2834497b2733c03ca42c9bf41b2b3d79d9319/usr_local_bin_xterm sudo chmod +x /etc/init.d/klipper sudo chmod +x /etc/init.d/moonraker sudo chmod +x /usr/local/bin/xterm sudo update-rc.d klipper defaults sudo update-rc.d moonraker defaults
-
Stop the Debian container.
-
Start XServer XSDL.
- One time setup:
- Tap 'Change Device Configuration'
- Change Mouse Emulation Mode to Desktop, No Emulation
- One time setup:
-
Start the Debian container.
-
KlipperScreen should appear in XServer XSDL and Mainsail and/or Fluidd should be accesible using your Android device's IP address in a browser.
You can start/stop Klipper and Moonraker manually by using the service
command (eg: sudo service start klipper
).
Logs can be found in /home/android/klipper_logs
.
There's an alternative in the works that you guys might find interesting: https://github.com/thingsapart/octo4a/tree/ubuntu-klipper-rebase
This one is a fork of Octo4a modified to run Ubuntu instead of Alpine via proot, and Klipper etc instead of Octoprint within that.