Error: Failed to autodetect serial port, please set it manually

#1

What is the problem?
Unable to connect to my Creality CR-10 via USB

What did you already try to solve it?
Quite a bit. Checked dmesg output for hints as to what might be going wrong. Checked /dev/tty* for any devices I might be able to add to Octoprint to get it to connect. Also checked lsusb output, and can see what appears to be the printer listed. Manually set baud rate in Octoprint to 115200 as directed in many postings, but still no success.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
OctoPrint version: 1.3.10
OctoPi version: 0.16.0
Printer: Creality CR-10 300
Firmware: No idea...
serial.log:

Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: []
Changing monitoring state from "Detecting serial port" to "Error: Failed to autodetect serial port, please set it manually."
Failed to autodetect serial port, please set it manually.
Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyprintk', '/dev/ttyAMA0']
Trying /dev/ttyprintk
Could not enter programming mode on /dev/ttyprintk, might not be a printer or just not allow programming mode
Trying /dev/ttyAMA0
Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyAMA0']
Connecting to: /dev/ttyAMA0
Changing monitoring state from "Detecting serial port" to "Opening serial port"
Connected to: Serial<id=0x6a9dbb70, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Changing monitoring state from "Opening serial port" to "Connecting"
Send: N0 M110 N0*125
Unexpected error while reading serial port, please consult octoprint.log for details: IOError: '[Errno 25] Inappropriate ioctl for device' @ comm.py:_readline:2605
Changing monitoring state from "Connecting" to "Offline (Error: IOError: '[Errno 25] Inappropriate ioctl for device' @ comm.py:_readline:2605)"
Connection closed, closing down monitor
Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: []
Changing monitoring state from "Detecting serial port" to "Error: Failed to autodetect serial port, please set it manually."
Failed to autodetect serial port, please set it manually.

So, I have done lots of research on this, and genuinely can't find the issue. Listing of /dev/tty* gives the following:

crw-rw-rw- 1 root tty       5,  0 Mar 19 15:36[40;33;01m/dev/tty
crw--w---- 1 root tty       4,  0 Mar 19 14:25[40;33;01m/dev/tty0
crw--w---- 1 root tty       4,  1 Mar 19 14:26[40;33;01m/dev/tty1
crw--w---- 1 root tty       4, 10 Mar 19 14:25[40;33;01m/dev/tty10
crw--w---- 1 root tty       4, 11 Mar 19 14:25[40;33;01m/dev/tty11
crw--w---- 1 root tty       4, 12 Mar 19 14:25[40;33;01m/dev/tty12
crw--w---- 1 root tty       4, 13 Mar 19 14:25[40;33;01m/dev/tty13
crw--w---- 1 root tty       4, 14 Mar 19 14:25[40;33;01m/dev/tty14
crw--w---- 1 root tty       4, 15 Mar 19 14:25[40;33;01m/dev/tty15
crw--w---- 1 root tty       4, 16 Mar 19 14:25[40;33;01m/dev/tty16
crw--w---- 1 root tty       4, 17 Mar 19 14:25[40;33;01m/dev/tty17
crw--w---- 1 root tty       4, 18 Mar 19 14:25[40;33;01m/dev/tty18
crw--w---- 1 root tty       4, 19 Mar 19 14:25[40;33;01m/dev/tty19
crw--w---- 1 root tty       4,  2 Mar 19 14:25[40;33;01m/dev/tty2
crw--w---- 1 root tty       4, 20 Mar 19 14:25[40;33;01m/dev/tty20
crw--w---- 1 root tty       4, 21 Mar 19 14:25[40;33;01m/dev/tty21
crw--w---- 1 root tty       4, 22 Mar 19 14:25[40;33;01m/dev/tty22
crw--w---- 1 root tty       4, 23 Mar 19 14:25[40;33;01m/dev/tty23
crw--w---- 1 root tty       4, 24 Mar 19 14:25[40;33;01m/dev/tty24
crw--w---- 1 root tty       4, 25 Mar 19 14:25[40;33;01m/dev/tty25
crw--w---- 1 root tty       4, 26 Mar 19 14:25[40;33;01m/dev/tty26
crw--w---- 1 root tty       4, 27 Mar 19 14:25[40;33;01m/dev/tty27
crw--w---- 1 root tty       4, 28 Mar 19 14:25[40;33;01m/dev/tty28
crw--w---- 1 root tty       4, 29 Mar 19 14:25[40;33;01m/dev/tty29
crw--w---- 1 root tty       4,  3 Mar 19 14:25[40;33;01m/dev/tty3
crw--w---- 1 root tty       4, 30 Mar 19 14:25[40;33;01m/dev/tty30
crw--w---- 1 root tty       4, 31 Mar 19 14:25[40;33;01m/dev/tty31
crw--w---- 1 root tty       4, 32 Mar 19 14:25[40;33;01m/dev/tty32
crw--w---- 1 root tty       4, 33 Mar 19 14:25[40;33;01m/dev/tty33
crw--w---- 1 root tty       4, 34 Mar 19 14:25[40;33;01m/dev/tty34
crw--w---- 1 root tty       4, 35 Mar 19 14:25[40;33;01m/dev/tty35
crw--w---- 1 root tty       4, 36 Mar 19 14:25[40;33;01m/dev/tty36
crw--w---- 1 root tty       4, 37 Mar 19 14:25[40;33;01m/dev/tty37
crw--w---- 1 root tty       4, 38 Mar 19 14:25[40;33;01m/dev/tty38
crw--w---- 1 root tty       4, 39 Mar 19 14:25[40;33;01m/dev/tty39
crw--w---- 1 root tty       4,  4 Mar 19 14:25[40;33;01m/dev/tty4
crw--w---- 1 root tty       4, 40 Mar 19 14:25[40;33;01m/dev/tty40
crw--w---- 1 root tty       4, 41 Mar 19 14:25[40;33;01m/dev/tty41
crw--w---- 1 root tty       4, 42 Mar 19 14:25[40;33;01m/dev/tty42
crw--w---- 1 root tty       4, 43 Mar 19 14:25[40;33;01m/dev/tty43
crw--w---- 1 root tty       4, 44 Mar 19 14:25[40;33;01m/dev/tty44
crw--w---- 1 root tty       4, 45 Mar 19 14:25[40;33;01m/dev/tty45
crw--w---- 1 root tty       4, 46 Mar 19 14:25[40;33;01m/dev/tty46
crw--w---- 1 root tty       4, 47 Mar 19 14:25[40;33;01m/dev/tty47
crw--w---- 1 root tty       4, 48 Mar 19 14:25[40;33;01m/dev/tty48
crw--w---- 1 root tty       4, 49 Mar 19 14:25[40;33;01m/dev/tty49
crw--w---- 1 root tty       4,  5 Mar 19 14:25[40;33;01m/dev/tty5
crw--w---- 1 root tty       4, 50 Mar 19 14:25[40;33;01m/dev/tty50
crw--w---- 1 root tty       4, 51 Mar 19 14:25[40;33;01m/dev/tty51
crw--w---- 1 root tty       4, 52 Mar 19 14:25[40;33;01m/dev/tty52
crw--w---- 1 root tty       4, 53 Mar 19 14:25[40;33;01m/dev/tty53
crw--w---- 1 root tty       4, 54 Mar 19 14:25[40;33;01m/dev/tty54
crw--w---- 1 root tty       4, 55 Mar 19 14:25[40;33;01m/dev/tty55
crw--w---- 1 root tty       4, 56 Mar 19 14:25[40;33;01m/dev/tty56
crw--w---- 1 root tty       4, 57 Mar 19 14:25[40;33;01m/dev/tty57
crw--w---- 1 root tty       4, 58 Mar 19 14:25[40;33;01m/dev/tty58
crw--w---- 1 root tty       4, 59 Mar 19 14:25[40;33;01m/dev/tty59
crw--w---- 1 root tty       4,  6 Mar 19 14:25[40;33;01m/dev/tty6
crw--w---- 1 root tty       4, 60 Mar 19 14:25[40;33;01m/dev/tty60
crw--w---- 1 root tty       4, 61 Mar 19 14:25[40;33;01m/dev/tty61
crw--w---- 1 root tty       4, 62 Mar 19 14:25[40;33;01m/dev/tty62
crw--w---- 1 root tty       4, 63 Mar 19 14:25[40;33;01m/dev/tty63
crw--w---- 1 root tty       4,  7 Mar 19 14:25[40;33;01m/dev/tty7
crw--w---- 1 root tty       4,  8 Mar 19 14:25[40;33;01m/dev/tty8
crw--w---- 1 root tty       4,  9 Mar 19 14:25[40;33;01m/dev/tty9
crw-rw---- 1 root dialout 204, 64 Mar 19 14:26[40;33;01m/dev/ttyAMA0
crw------- 1 root root      5,  3 Mar 19 14:25[40;33;01m/dev/ttyprintk

Tried adding ttyAMA0 and ttyprintk to the list of additional ports.

output of lsusb is as follows:

Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 007: ID 0424:7800 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I believe device 009 is the printer, so it's being picked up by the OS.

I expected to see /dev/ttyUSB0 listed, but it's not there at all, so obviously adding that into the list of additional ports is a waste of time.

Anyone got any ideas? Would really love to get Octopi up and running.

Thanks

#2

So ttyAMA0 is definitely the Raspberry Pi's own serial port (the one on its GPIO headers) and not your printer, unless you've intentionally reconfigured that, which I assume you have not.

I agree that it is probably 009 on bus 001. To figure out what device is the right one, SSH into your Pi. Unplug the printer, plug it in again, run dmesg. It should say something about a USB serial device having been found and which one. Or that it ran into an issue in which case that's also a hint. Best provide the output of dmesg so we can take a look at it as well.

#3

Thanks @foosel. putty.log (126.2 KB)

Output of dmesg attached...

Tried googling the 'no module found in object' message but couldn't find anything meaningful.

#4

Any thoughts anyone?