Klipper use with Android controller

Basic Information:

Printer Model: Ratrig VCore3 400
MCU / Printerboard: BTT Octopus

Hi
This is a search for knowledge and information.
Want to use Klipper on Vcore3.1 printer. Would like to use an Android phone as the controller, 3gb Ram, 64gb storage, Snapdragon 801 @ 2.5GHz… It seems a good solution on the face of it, as touch screen and processor are all in one.
This has been done before but I want to know if I can plug an SD Card or thumb drive with the gcode file into the mainboard (BTT Octopus) and use this to print from or would I have to load the file into the phone by wifi ?

First time using klipper so remember I am a newbie :upside_down_face:

Best Regards

Dataguy

For an understanding how Klipper works see Klipper Architecture / Ecosystem
That being said:

  • Klipper needs a full Linux including respective build tools
  • Needs Python and Python modules
  • Full fledged USB port to talk to the printer board

While theoretically Android should come close, I doubt that it will run out of the box

I’ve taken the info from a YouTube Channel called ’ Run Klipper on Android! ’ by DalTron Printing.
He refers to

and

as the sources which enabled him to do it.

If possible it will be more or less the same as a mythical RPi with touch screen.

Hence my interest.

Best Regards

Dataguy

Well, try it and report back. After a quick view on it, nothing I would spend my time on. Seems that Klipper is running in kind of a virtual machine. Can work, can fail. See Running Klipper in a Virtual Machine (VM)

Well, I have a phone here that’s been rooted and is in otherwise good condition, so it may be worth a shot. Also a good use recycling what is otherwise scrap.

Would much sooner use an RPi but availability is non existant in the UK atm.

I’ll post if I get it working.

Best Regards

Dataguy

As Raspberrys are hard to get (or valued their weight in gold), i tried the same thing.
There are a few approaches, first being using the Linux Deploy app you already mentioned.
Issues come with newer Android versions being more restrictive and Linux Deploy seems out of development. On my LineageOS 18/Android 11 phone a had trouble getting the Linux containers to run and i did no further elaboration as i don not regard this as an future-proof approach.

Second approach would be to use a “real” Linux on the phone, at least if yours is supported:
Search for “Ubuntu Touch” (i am limited in the amount of links i am allowed to post)
Under ubuntu touch you can create a (more or less full featured) Ubuntu chroot container by using Libertine:
https://wiki.ubuntuusers.de/Ubuntu_Touch/Libertine/
You will have to edit the common installer scripts, as chroot has no concept of sudo.
I ran in something what i think are version issues of pyathon and/or greenlet. Further elaboration has to bee done, but it seems like an promising approach.

Last approach (and the one i am using currently) is octo4a:

Setup was pretty simple for me (Oneplus 3 with Lineage 18) and it seems to work (at least for the last 24 hours). I am not sure how they have done this, by virtualization or a container like Android Deploy (which would contradict my statement regarding future-proofnes), but they run a Alpine Linux instance wich is also able to run Klipper.

But beside the software, there is another issue: You have to be lucky to find a combination of phone and USB-OTG adapter which will allow simultaneous charging and data connection.

So if you start from zero, buying an old thin client for 30€ and run Debian on it might be the simpler solution…

1 Like

I think I’m lucky because my phone supports OTG, and uses Andriod 8. The printerboard (Btt Octopus Pro) will happily supply the charging current, though I don’t know if it will charge and run Klipper at the same time. I think it likely.
USB OTG is just a cable with an extra link to gnd from pin 4? of the connector. Pin 4 to ground with a resister (56k??) should allow simultaneous charging and datatransfer. Have seen web info where people use a switch, such that initially connection is open for charging but when switch is closed USB OTG data transfer is enabled, with charging continuing. Will test it out with usb C connector.

I do have an RPi 3B with Touch Screen but its used on my Telescope and I’m reluctant to cannibalise it for this. (If prices get high enough I may be able to afford a holiday !!)

Best Regards

Dataguy

Having a printerboard which is able to supply power to the phone is of course the absolute best case.

As a little more hacky solution… a phone will work perfectly fine even with a removed battery.

The phone gets its power via a step down converter directly form the printers 24V supply.
As a connection piece, i had to cut the cable of the phones battery (not a big loss as it was not far from death).
Also solves the issue to power down the phone automatically with the printer.
Some phones might need an additional resistor to gnd or sth. to simulate the presence of the battery.

Disclaimer:
If everyone is willing to try this: You are working with a Li-Ion battery, i am not responsible if you kill your phone, yourself or everyone you love by burning your house down.

As i can only embed one Picture per post:

@LuckyN7
Thx for the pictures. The phone is scrap anyway so adding extra leads and removing the battery may be a good option. Does it take a long time to boot if the battery is removed?
Can you see any other performance hit using a phone like this ?
Using a scrap phone seems like a good solution to me with built in touch screen and camera.
Thx for the info
Best Regards
Dataguy

I did not notice any difference in boot time. Performance in octo4a also feels the same.
Can’t tell about overall performance, as i did not any benchmarks beforehand.

I am more concerned about sudden power offs due to spikes in power consumption, i am not sure how well the LM2596S can handle those. But for the first few test everything seems fine.