Skip to content

Octoprint Plugin to print to ttyACM* devices on Android through libusb in Termux

Notifications You must be signed in to change notification settings

schuhumi/Termux_CDC_ACM

Repository files navigation

Termux_CDC_ACM

Octoprint Plugin to print to tty ACM devices on Android through libusb in Termux. It uses libusb and a cdc-acm-driver written in Python.

This als ALPHA!

usblib.py is taken from GitHub - Querela/termux-usb-python: USB access with Python on Termux (Android)

How to use

1. Install Termux and Termux:API apps

2. Inside Termux:

You might want to set up a ssh server to have an easier time typing all that stuff via a remote shell on your computer ( https://wiki.termux.com/wiki/Remote_Access#Using_the_SSH_server ), but you can also punch it into your phone:

pkg update
pkg install python termux-api libusb clang git libexpat
pip install octoprint pyusb pyftdi

3. Make sure your printer connection works

termux-usb -l

should show something like /dev/bus/usb/001/011when the printer is connected (usually via an USB-OTG adapter)

4. Test if Octoprint works

first you can check your current ip using

ip addr

then start octoprint like this.

octoprint serve

If octoprint works correctly on http://<ip-addr>:5000, complete the setup dialog. Then stop it again with Ctrl+C

5. Install the plugin

cd ~/.octoprint/plugins
git clone https://github.com/schuhumi/Termux_CDC_ACM/

6. Start Octoprint again

octoprint serve

You should now see an entry similar to /dev/bus/usb/001/011 in the serialport dropdown menu in Octoprint's webinterface. Choose it and also choose the correct baudrate, then click connect. Now a popup should appear on your Android device asking for Termux's permission to access the usb device, choose yes. Octoprint should now connect to your printer.

About

Octoprint Plugin to print to ttyACM* devices on Android through libusb in Termux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages