Klipper on Android (on my Amazon Fire tablets!) with Octo4a (Octoprint for Androids)

There is a helpful tutorial, together with links/commands for software, here:

Some other helpful info was in one of the comments here: Klipper support · feelfreelinux/octo4a · Discussion #59 · GitHub

And I figured out a workaround for another issue that I documented in comments here:

and here:

In related news:

Android has never been my forte, and I’m foggy brained. I’ve got literally everything done except for getting my “printer.cfg” file moved onto the Amazon Fire7 tablet, and I’m having a brain lapse on how to do it. If anyone has any tips for me on that, I’d sure appreciate it.

UPDATE: I’m currently watching a YouTube video on how to copy files using SSH!

Looks like I’ll be using something I’ve not ever used before, the “scp” command (secure copy command) in SSH:

Hmmm. I cannot seem to get that to work.

1 Like

If your android fire tablet, has a web browser still, can you just load the other printer interface and download it?

If not, and you use a windows pc, I found an ssh client that does scp as well and lets you select “download file” and you can select one from your machine or from the target system and pull or push from one to the other. Pretty slick. I think it is smarTTY, but I’ll verify when I get on my other system.

1 Like

@orob Thanks for the great ideas. Will give these a try.

Well, this downloads it to Downloads. Then I tried to use the Google Files app to move the file, but I can’t see a /root folder anywhere to move it to.

Now you can ssh in and just use the mv command to move the file

The SSH provided seems to not have access to where the downloads are (or where any of the Android device’s “folders” are). It acts like I’m at the root / top of the folder structure, but when I enter “ls” to see any folders, none show. Doing something like " cd… " — nothing happens. (ps: I’m typing two dots yet it gets displayed as three.)

IIRC, android has a strict filesystem to keep apps from spying on each other. Some folders are more global (like downloads). You can try moving it there. But then you’d have to make klipper read it or copy it to another storage.

But honestly, I didn’t read the guide and I have no idea how you might have gotten klipper on a fire tablet.

1 Like

@jeffeb3 I think your mention about strict file system to prevent cross app spying is spot on here. It’s like the script to install Klipper somehow created a type of “Walled Garden” where some actual folder somewhere on the Android tablet (something along the lines of android/data/com.octo4a/files), is reckoned a type of “false secondary root” for the Klipper project. It’s Klipper’s root, but not the actual root of the tablet. The install script seems to have created a new port for SSH into this walled off area, 5002. When I connect via SSH into that area, I see an empty “printer.cfg” file, as a temporary stand in. There’s probably some easy way inside Klipper to populate the contents of that file. I will try that. In my hazy brain of yesterday (I had suffered at least two massive apneas during the night before, which my CPAP machine’s adjustable pressure method did work right for, and I was mind fogged the whole day) I was trying to find a way to manually force what there is probably an easy fix for.

1 Like

Side note on SSH: Inside the Octoprint for Android app, under Settings, there is an option to turn on OpenSSH that has its own port number, and unlike the 5002 port “remote web terminal” thing under Extensions, which is used in the Klipper install, and that “just works” inside a browser by visiting, for example,

http://192.168.1.4:5002

the “regular” OpenSSH version works in a terminal, like “normal,” except you have to remember to use the "-p- flag to set the port to 8022, like this:

ssh root@192.168.1.4 -p 8022 -A

And it results in a terminal display that says it is “Alpine”:

1 Like

Alas, one of my two remaining Amazon Fire7 tablets, seems to have a bad battery (won’t stay on and won’t boot back on). I think I bought 4 of them on a black friday sale, and gave away a couple of them to my sons, and I had 2 left. I am down to one.

Update: I had an “OTG” thing on the one that I thought had a bad battery. It said 1% for the longest time. It shut off. I tried to reboot it, and it seemed like it would never boot. I moved the OTG thing to the other one. As soon as I plugged the regular power cord back into the one I thought was bad, its screen came on, and it now shows 100% battery charge. I don’t know what to make of it.

Updated Update: Apparently, despite carefully shopping for an “OTG” thing that allows pass through charging, I seem to have gotten one that either barely does it or simply does not do it.

I am trying to connect one of the Amazon Fire7 tablets to a printer that’s been flashed for Klipper use.

It’s connected via USB.

I have a never ending spinny thing on “Octoprint is starting… this could take a couple of minutes.”

I also have an “Unknown serial driver (tap to select)” that when I tap it, it says it’s requesting connection (which then disappears), but “Unknown serial driver” thing never goes away.

This latter thing could be related to a baud rate mismatch, but until I solve the former thing, it means I cannot connect from my laptop browser with the Octoprint client, which would presumably, possibly, have the Klipper plugin / extension option to edit the “printer.cfg” contents, to adjust the baud rate. The latter could also be related to the fact that my “printer.cfg” file is empty!

So back to your question about printer.cfg

Using the browser on the fire, open the printer.cfg that you want as if to edit it and copy all the text then open the blank one and paste it.

OK, this sounds doable. I just don’t know how to open the blank one. I can “see” it in the remote browser “terminal” with ls command. I guess I need to see if there is some flavor of text editor in that remote browser “terminal.”

Update: According “google” — " There are two command-line text editors in Linux®: vim and nano "

So, I will try.

UPDATE: I have two flavors of terminal, remote browser based terminal using port 5002, and OpenSSH in regular terminal using port 8022. I don’t think either one has Vim or Nano, and I’ve tried a couple of install methods, but getting nowhere. Also, the idea of just connecting to the Octoprint web server to access the Klipper plugin, in hopes of finding an editing tool, cannot seem to connect. I clearly am the opposite of a Linux expert, and this totally beyond my current abilities. LOL

One curiosity. I know that klipper for 3d printers has huge features. Besides the camera recording and remote access, is there any other for CNCs?

I had hopes of using these tablets for Klipper-izing some 3D printers. I don’t have any info on using Klipper for CNC. Sorry.

There is a klipper for cnc repo or on the klipper forum, there is this thread that you could browse if you like. It is on my list to investigate further. If you feel inclined and have the time, please check it out, start a thread and share what you find. I’m sure there are others besides me that have interest, but maybe not the bandwidth at the moment to investigate.

1 Like
  1. can you get to the old printer.cfg file? can you save it to your pc that you are using to ssh into the android device?
  2. can you use the pc to open the klipper mainsail interface on the android device?

If yes to both of those, then save the printer.cfg file to your pc and then use the web interface to “edit” the empty printer.cfg and paste in the text from the file you downloaded.

I cannot see any way to do this. I’m sure a Linux / command line expert would know what to do.

I followed the steps of the tutorial as closely as I could, with exception listed here:

#59 (reply in thread)

Now Octoprint cannot start, with a log message like this:

octoprint could not initialize event manager: invalid version /usr/lib/python3.9/site

Does anyone have any tips for what to do now? I don’t know what more to try.

when you originally downloaded the file, was it over a web page connection to the old device?

I’ve never downloaded the empty / dummy printer.cfg file. I can see it exists by the “ls” command.