Octoprint server on Android smartphone (serial port problem)

#1

Hello,

I am using a samsung galaxy A3 2015 under resurection remix 7.1 to monitor my printer with its camera. I decided to push a little and I installed LinuxDeploy to set up an octoprint server on this periphery.

I installed debian arm and deployed octoprint on the local network.
The problem lies in the communication of the serial port.
With a dmesg in ssh on the debian of LinuxDeploy, I have this return:


[85207.609290] usb 1-1: full-speed USB device number 10 using msm_hsusb_host
[85207.737337] usb 1-1: New USB device found, idVendor = 1a86, idProduct = 7523
[85207.737475] usb 1-1: New USB device strings: Mfr = 0, Product = 2, SerialNumber = 0
[85207.737514] usb 1-1: Product: USB2.0-Serial

An lsusb, gives me my printer:

Bus 001 Device 014: ID 1a86: 7523 QinHeng Electronics HL-340 USB-Serial Adapter

Now I can not determine the serial port in octoprint.
By cons I can send a GCODE with an application like Serial USB Terminal ..

Like to fix it? Thank you

#2

You've installed OctoPrint... on your smartphone? Are you trying, then, to connect the micro USB to the printer?

Personally, I would remote ssh in and do an ls -l /dev before/after plugging in the printer. The new device should be what you're looking for.

#3

The printer is well connected to the phone on this side no problem.
The problem lies in the chroot of LinuxDeploy. No access to / dev / ttyUSB (normally the printer will map there)

But the printer is present in the chroot:

r

oot @ localhost: ~ # dmesg | grep USB
[7226.777545] usb 1-1: full-speed USB device number 9 using msm_hsusb_host
[7226.911824] usb 1-1: New USB device found, idVendor = 1a86, idProduct = 7523
[7226.911852] usb 1-1: New USB device strings: Mfr = 0, Product = 2, SerialNumber = 0
[7226.911872] usb 1-1: Product: USB2.0-Serial
root @ localhost: ~ # usb-devices
T: Bus = 01 Lev = 01 Prnt = 01 Port = 00 Cnt = 01 Dev # = 9 Spd = 12 MxCh = 0
D: Ver = 1.10 Cls = ff (sell) Sub = 00 Prot = 00 MxPS = 8 # Cfgs = 1
P: Vendor = 1a86 ProdID = 7523 Rev = 02.63
S: Product = USB2.0-Serial
C: # Ifs = 1 Cfg # = 1 Atr = 80 MxPwr = 98mA
I: If # = 0 Alt = 0 # EPs = 3 Cls = ff (sells) Sub = 01 Prot = 02 Driver = (none)
#4

ChrootOnAndroid -> handling /dev

As of version Lil' Debi v0.4.4, Android /dev/ is not bind-mounted in chroot. This means no /dev/block/, /dev/log/, /dev/graphics/ and such. Bind-mounting it there results in conflict between Android logger and syslog, so syslog users should not do that, unless they have workaround. Additionally, if /dev/ isn't bind-mounted some Android executables, such as am, dalvikvm, logcat and many others won't run from inside chroot.

It looks from here that it has mounted the /dev on the phone but from the command line it looks like CentOS would be the o/s he succeeded with.

I know that with the Docker image of OctoPrint, you have to specify a fair amount of arguments on the command line to get that going. If you omit any of them, then some of the functionality doesn't bind between "reality" and the spun-up container's virtual world. Since the word "container" was used in that last link above, this could be a Docker-like experience and it may need more arguments for this to work.

For example:

docker run -d -v --device /dev/ttyACM0:/dev/ttyACM0 -p 5000:5000 --name octoprint octoprint/octoprint
#5

With debian/arch etc, /dev is well mounted.

By the way there is no /dev/ttyUSB in the android system (simple terminal) when I plug the printer.

But where does it map the serial port finally!
I post not get on the linuxdeploy git

#6

You'd have to concentrate on what dev was added when you plug it in. Pay attention before/after plugging it in what's in the ls /dev folder. That would be the port you're looking for.

If there is no difference before/after, then I would guess that the container needs more binding like in the example for Docker which I provided.

#7

Hi, did you already solved this problem? I'm trying the same like you but I'm only linux beginer. I'm trying to use Octoprint on rooted Xperia Z1 Compact, stock ROM, installed app "Linux Deploy"l, throught this app I installed Linux Debian Jessie. After that I followed guide for installing Octoprint on Raspberry. Now I have running web interface of Octoprint but when I want to connect to my printer I still have under Serial Port only option Auto. USB cable is Ok, I was trying to controll printer throught some android app and it was working. After that I ran command "dmesg" in linux and there I see another new device when I connect my printer (screen in the attachment) but I don't know how can I link octoprint to this device. Can you give me some advice? Thank you so much