Can't establish serial connection (already using existing fix)

Hi All,

I'm quite new to Octoprint. I have two FreeBSD iocages each running an Octoprint installation. The first jail wich is connected to my Creaity CR-10S Pro V2 is working properly. The second one connects to a MP Select Mini V2...better said SHOULD connect :wink: I'm already using the connection fix for Malyan/Monoprice but it will not connect at all. I already enabled serial debugging but unfortunately cannot find an usable information.

Would be very appreciated if someone has an idea how to fix the issue. Details are listed below.

Thank you in advance, greetings from Berlin and stay save!

Martin


Host OS: FreeNAS-11.3-U2
Jail OS: FreeBSD 11.3-RELEASE-p7
Octoprint version: 1.4.0 with OctoPrint Malyan Connection Fix Plugin (https://github.com/OctoPrint/OctoPrint-MalyanConnectionFix)
Printer: Monoprice Select Mini V2
Printer firmware: latest V41 (it is currently printing so i cannot check the exact version number :wink: )

Terminal output:

Connecting to: /dev/cuaU0
Using Malyan/Monoprice Connection Fix Plugin to create serial connection
Changing monitoring state from "Offline" to "Opening serial port"
Connected to: Serial<id=0x8115a0790, open=True>(port='/dev/cuaU0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=
Starting baud rate detection...
Changing monitoring state from "Opening serial port" to "Detecting baudrate"
Trying baudrate: 115200
Send: N0 M110 N0*125
Baudrate test retry #1
Send: N0 M110 N0*125
Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disc
Please see https://faq.octoprint.org/serialerror for possible reasons of this.
Changing monitoring state from "Detecting baudrate" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or mu
Connection closed, closing down monitor

Serial debug log:

2020-04-23 12:31:31,641 - Enabling serial logging
2020-04-23 12:31:44,880 - Connecting to: /dev/cuaU0
2020-04-23 12:31:44,880 - Using Malyan/Monoprice Connection Fix Plugin to create serial connection
2020-04-23 12:31:44,883 - Changing monitoring state from "Offline" to "Opening serial port"
2020-04-23 12:31:44,886 - Connected to: Serial<id=0x8115bbb10, open=True>(port='/dev/cuaU0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-04-23 12:31:44,886 - Starting baud rate detection...
2020-04-23 12:31:44,887 - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2020-04-23 12:31:45,891 - Trying baudrate: 115200
2020-04-23 12:31:45,893 - Send: N0 M110 N0*125
2020-04-23 12:31:55,959 - Baudrate test retry #1
2020-04-23 12:31:55,962 - Send: N0 M110 N0*125
2020-04-23 12:31:56,746 - Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823
2020-04-23 12:31:56,746 - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-04-23 12:31:56,747 - Changing monitoring state from "Detecting baudrate" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)"
2020-04-23 12:31:56,750 - Connection closed, closing down monitor
2020-04-23 12:32:13,368 - Connecting to: /dev/cuaU0
2020-04-23 12:32:13,371 - Using Malyan/Monoprice Connection Fix Plugin to create serial connection
2020-04-23 12:32:13,373 - Changing monitoring state from "Offline" to "Opening serial port"
2020-04-23 12:32:13,374 - Connected to: Serial<id=0x8104c0590, open=True>(port='/dev/cuaU0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-04-23 12:32:13,376 - Changing monitoring state from "Opening serial port" to "Connecting"
2020-04-23 12:32:13,382 - Send: N0 M110 N0*125
2020-04-23 12:32:25,099 - Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823
2020-04-23 12:32:25,101 - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-04-23 12:32:25,102 - Changing monitoring state from "Connecting" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)"
2020-04-23 12:32:25,105 - Connection closed, closing down monitor

Octoprint log:

2020-04-23 12:32:13,373 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial port"
2020-04-23 12:32:13,376 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Connecting"
2020-04-23 12:32:13,382 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-04-23 12:32:25,098 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
  File "/data/Octoprint/venv/lib/python2.7/site-packages/octoprint/util/comm.py", line 2823, in _readline
    ret = self._serial.readline()
  File "/data/Octoprint/venv/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-04-23 12:32:25,100 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-04-23 12:32:25,102 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)"

Just to get it out of the way. Have you tried to connect to the serial port using minicom (or equivalent)? If so, can you communicate with the controller there?

Yes, at least I see that something is happening on the port:

ugen0.2: <Malyan System Malyan 3D Printer> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
usbdump -i usbus0
10:12:03.754423 usbus0.2 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0
10:12:03.756029 usbus0.2 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0
10:12:03.756097 usbus0.2 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0
10:12:03.758096 usbus0.2 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0
10:12:03.772102 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.774037 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0,ERR=0
10:12:03.777073 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.779035 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=20,IVAL=0,ERR=0
10:12:03.779059 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.781158 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.781198 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.783154 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.783195 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.785078 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.785097 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.787154 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=28,IVAL=0,ERR=0
10:12:03.787194 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.789030 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.789046 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.791039 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=28,IVAL=0,ERR=0
10:12:03.791108 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.793023 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.793038 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.795095 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=36,IVAL=0,ERR=0
10:12:03.795193 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.797141 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=12,IVAL=0,ERR=0
10:12:03.797224 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.799140 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=68,IVAL=0,ERR=0
10:12:03.799222 usbus0.2 SUBM-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
10:12:03.801100 usbus0.2 DONE-CTRL-EP=00000080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
10:12:03.801170 usbus0.2 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0
10:12:03.803141 usbus0.2 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0

Thanks, Martin

Okay so you can see but can you actually connect to it and use the printer from a plain serial console?

Sorry for the late reply.

Yes, when using minicom it works. Also if I connect the printer to another machine running Simplify3D. Therefore I assume that it is no printer problem.

Would you be able to test the printer on a Linux environment? The only reason I ask is because OctoPrint-MalyanConnectionFix has a specific mention about Windows

Note that due to the nature of this sequence this fix can't work for OctoPrint installations on Windows and is therefore not supported for that OS.

I am wondering perhaps FreeBSD also has a similar issue as I doubt it the plugin was actually tested on it.

Indeed it works on Linux. Well then I have to continuie the fight with FreeBSD :wink: I would liek to run Octoprint on my NAS which is anyway running all the time.

Thanks for your help!

Open a bug on the tracker there with as much detail as you can provide.

I simply attached the printer to a Linux VM (it is running anyway) and use socat to print. Works perfectly.