Disconnection issues with rpi and Ender 3 pro

What is the problem?

I recently purchased an Ender 3 Pro and love it. I decided to connect it to OctoPrint. I used the website instructions to get it all up and running. I’m using a raspberry pi 3B+. Here is my issue:

  1. I’ve been getting failed prints while using OctoPrint. I designed sometime or downloaded something to print. From Cura I uploaded the gcode file up to OctoPrint and kicked off the print. I walked away for some time and when I checked on it I noticed the camera feed was stopped and it was no longer connected. When I made it to the printer I was able to pull of the log which essentially simply stated that there was an error that disconnected OctoPrint from the printer. I tried multiple prints, multiple days with no luck. I have already rebuilt the OctoPrint OS and still get the same error.
    I’ve tried almost everything for troubleshooting the rpi so I decided to run OctoPrint from my windows 10 machine and so far I have printed successfully twice!

What did you already try to solve it?
Checked USB, ran OctoPrint from windows instead of raspberry pi, multiple prints, different days. See description of issues and logs section.

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)

So I finally had time to sit through a print and watch closely. Here's what I did:

  1. SSH'd to my pi and ran uptime (it said it had been running for about 13 hours which is correct)
  2. Ran top to make sure the pi was not running out of resources (as some of you suggested)
  3. from my machine i ran a continuous ping to the pi
  4. loaded a small 40 minute print to octoprint and ran it.
    Keep in mind I'm using the exact same cable that I used to run octoprint from my windows machine (2 prints totaling 8 hours went flawless). During the print I wiggled the usb (as some of you suggested) from the pi and the printer side and the print continued as normal.Unfortunately the print went flawless however once the print was done (a few minutes afterwards). I went to load up a different print, perhaps a longer one to see if I could recreate the issue. From Cura to octorpint was sucessfull so when I launched the octoprint ui I noticed this error under state: Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793).
    When I looked through the octoprint.log, this is what I found:
    2019-10-30 09:51:58,364 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Finishing"
    2019-10-30 09:51:58,382 - octoprint.printer.standard.job - INFO - Print job done - origin: local, path: CE3_tmpna6cdjxtCr-10_Extruder_knob_V2.gcode, owner: lal309
    2019-10-30 09:51:58,414 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Operational"
    2019-10-30 09:55:35,765 - octoprint.plugins.anywhere - ERROR - [Errno 32] Broken pipe
    2019-10-30 09:57:36,343 - octoprint.plugins.anywhere - ERROR - [Errno 32] Broken pipe
    2019-10-30 10:03:25,239 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
    Traceback (most recent call last):
    File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2793, in _readline
    ret = self._serial.readline()
    File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4932, in readline
    c = self.read(1)
    File "/home/pi/oprint/local/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?)
    2019-10-30 10:03:25,276 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
    2019-10-30 10:03:25,296 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793)"
    2019-10-30 10:03:26,229 - tornado.access - WARNING - 409 GET /api/printer (::ffff:192.168.0.5) 18.89ms
    2019-10-30 10:03:36,248 - tornado.access - WARNING - 409 GET /api/printer (::ffff:192.168.0.5) 18.87ms
    2019-10-30 10:03:46,244 - tornado.access - WARNING - 409 GET /api/printer (::ffff:192.168.0.5) 19.21ms
    When I looked through the serial log, this is what I found:
    2019-10-30 10:03:05,472 - Recv: T:26.53 /0.00 B:36.33 /0.00 @:0 B@:0
    2019-10-30 10:03:07,474 - Recv: T:26.53 /0.00 B:36.33 /0.00 @:0 B@:0
    2019-10-30 10:03:09,474 - Recv: T:26.53 /0.00 B:36.33 /0.00 @:0 B@:0
    2019-10-30 10:03:11,474 - Recv: T:26.51 /0.00 B:36.23 /0.00 @:0 B@:0
    2019-10-30 10:03:13,474 - Recv: T:26.48 /0.00 B:36.08 /0.00 @:0 B@:0
    2019-10-30 10:03:15,473 - Recv: T:26.56 /0.00 B:36.15 /0.00 @:0 B@:0
    2019-10-30 10:03:17,474 - Recv: T:26.45 /0.00 B:36.02 /0.00 @:0 B@:0
    2019-10-30 10:03:19,475 - Recv: T:26.42 /0.00 B:36.00 /0.00 @:0 B@:0
    2019-10-30 10:03:21,474 - Recv: T:26.36 /0.00 B:36.00 /0.00 @:0 B@:0
    2019-10-30 10:03:23,474 - Recv: T:26.36 /0.00 B:36.00 /0.00 @:0 B@:0
    2019-10-30 10:03:25,275 - 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:2793
    2019-10-30 10:03:25,287 - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
    2019-10-30 10:03:25,295 - Changing monitoring state from "Operational" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793)"
    2019-10-30 10:03:25,322 - Connection closed, closing down monitor
    After looking at the logs I ran "uptime" again to ensure the pi was not rebooted and the command showed 14 hours. So no reboot. I reviewed my continuous ping to ensure it had not drop it's internet connection and the ping showed no breaks.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)

Latest version of octopi and OctoPrint. Ender 3 Pro. Rpi 3B+.

I also ran an 8 hour print and at the 7.5 hour mark this happened again. The logs showed exact same messages from web us, OctoPrint.log and serial.log

Let's check the usual things first :slight_smile:

  • try an other cable. Even if it worked with your windows pc.

  • is your power suply sufficient? Are there undervoltage warnings in your logs?

I had a similar case with my Ender 3 Pro


Are the any devices nearby which could interfere with the connection?

Btw the op of this thread also switched to his own marlin and he didn't mention his problem again. So I guess it worked :smiley:

I haven’t tried another cable because it worked just fine (few prints totaling about 4+ hours) on my windows pc. I would have to order a new one. Any recommendations?

I know the power supply is not the OEM raspberry pi. Where can I see the undervoltage messages (if any)? I’m assuming syslog but there are so many messages in that log that it may be hard to spot it without knowing keywords to search the logs against. Any recommendations?

Thanks for replying. I’ve searched a lot about this issue and even asked on reddit but no luck finding an answer.

It should be a cable with good shielding and ferrite beads but I can't recommend one.
My cable is like 10 years old and I already had it in my cable box :smiley:

But if I were you I would go for the own marlin solution. You can always go back to the creality firmware if you get any issues.

1 Like

Hi, I am experiencing the same issue, with Ender 5, since the last friday. My cables are good, they were working. I also have a USB Cam attached to the RPi running with motion.

I posted this issue here.

The log says it best. Visit the link for possible reasons.

It seems I fixed problem with USB connection between Ender 3 and my laptop. I changed baudrate to 250000 (need good usb cable) and cache setting in Marlin. Now it prints 4 hours without any problem. And the print quality is much better. Basic idea from here: https://www.thingiverse.com/thing:3626658
I have BUFSIZE 16 and TX_BUFFER_SIZE 16. Rest the same. Need to find correct place for Ender in files because these variables are on more places. Good luck!

1 Like

I believe i'm having the same sort of issue. I'm having problems with sending G-Codes to Octoprint recently. I was printing thing with no problems for the last few months. Octoprint connects to my Ender 3 V2 printer so I can adjust the nozzle/bed temp and see my camera feed with Octoprint and Cura. But as soon as I send a print it cuts off my internet connection of my main computer and wont let me print anything. Ive tried all sorts of things including re-flashing my Raspberry pi 4b but it still doesn't work. Any suggestions?