I’m trying to install Klipper on my LG V20 running LOS 18.1 (AOSP 11) and a 3.18 kernel compiled with the ch341 driver. I’ve seen multiple instances of people having installed Klipper on their Android device in a chrooted Linux: 1, 2. I’ve been trying to do that for the past few days, but with little success even though, on the exact same setup, Octoprint was running for over a month with little to no Issues. The main problem I’m facing is the printer not showing up in /dev/serial/ , It only shows up in /dev/ttyUSB[0-9] and /dev/bus/usb/001/00[^1] and when I point the serial: flag in printer.cfg to it I get errors in the klippy.log like ‘can’t open /dev/ttyUSB0’. I tried changing the permissions to 777, doesn’t work. I also tried installing Klipper in a VM on my main PC, it works and can communicate with the printer. My best guess is that I don’t have proper kernel serial driver support, that would make this question a bit off-topic, but I’ve asked on multiple places and still haven’t figured it out. TLDR; Printer doesn’t show up in /dev/serial on Android, how do I fix it so it does?
Fluidd error:
mcu 'mcu': Unable to connect
Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Error configuring printer
Important tail of klippy.log:
mcu 'mcu': Starting serial connect
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
webhooks client 488878322544: New connection
webhooks client 488878322544: Client info {'program': 'Moonraker', 'version': 'v0.7.1-376-g34f607c'}
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/bus/usb/001/002: [Errno 2] No such file or directory: '/dev/bus/usb/001/002'
…same with /dev/ttyUSB0.
Important output of lsusb:
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1a86 QinHeng Electronics
idProduct 0x7523 CH340 serial converter
bcdDevice 2.64
iManufacturer 0
iProduct 2 USB Serial
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1
bInterfaceProtocol 2
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
Edit, forgot the output of dmesg, it recognizes the printer and attaches the ch341-uart converter to it (just search for ‘ch341’): http://sprunge.us/HfUEAe (too long of a message, and I’m getting an error when uploading a txt/zip)
I hope I’m not too off-topic and that anyone who has any ideas will chime in.