Ender 3 V2 loses serial connection when printing

What is the problem?

Ender 3 V2 loses serial connection 30-45 minutes into any print. Seems to be caused by the motor movement, as heating and idling do not cause any problems. I am running OctoPrint from a laptop with Ubuntu.

What did you already try to solve it?

  • Changed USB cable and port
  • Blocked 5V pin on USB cable
  • Updated firmware
  • Updated OctoPrint

I managed to get something that works by uploading files to an SD card inside the printer, then printing from that. However, this method has a host of problems, most notably occasional file corruption (possibly related to bad serial connection?) and awful upload speeds.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, what kind of hardware precisely, ...)

  • Ender 3 V2
    • Latest firmware from GitHub
  • Ubuntu 20.04.02 LTS
    • OctoPrint 1.5.3
    • Running on an Dell Inspiron 6400 laptop

Hello @PerfectlyInternal !

This issue with the Ender 3 printers occur here all the time.

Uploading a file from OctoPrint to the printers SD card usually works as printing: line after line. That is why it takes its time.

Anyhow, can you share the logs?

Here is octoprint.log just before losing connection. Every time it disconnects like this, with a SerialException. This section in particular was during a print running from the SD card, so the motors were definitely moving when the server lost connection.

2021-01-31 23:30:38,857 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial connection"
2021-01-31 23:30:38,858 - octoprint.plugins.meatpack - INFO - [Serial]: Cannot query packing state -- port not open.
2021-01-31 23:30:38,858 - octoprint.plugins.meatpack - INFO - [Serial]: Cannot query packing state -- port not open.
2021-01-31 23:30:38,886 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial connection" to "Connecting"
2021-01-31 23:30:38,894 - octoprint.plugins.meatpack - INFO - [Serial]: Config var [Enabled] synchronized (=enabled).
2021-01-31 23:30:38,894 - octoprint.plugins.meatpack - INFO - [Serial]: Config var [NoSpaces] synchronized (=enabled).
2021-01-31 23:30:38,894 - octoprint.plugins.meatpack - INFO - [Serial]: MeatPack configuration successfully synchronized and confirmed between host/device.
2021-01-31 23:30:38,895 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-01-31 23:30:38,997 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-01-31 23:30:39,015 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Operational"
2021-01-31 23:30:39,086 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-01-31 23:30:39,254 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin bugfix-2.0.x (Jan 31 2021"
2021-01-31 23:30:39,271 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2021-01-31 23:30:39,304 - octoprint.util.comm - INFO - Externally triggered heatup detected
2021-01-31 23:30:39,648 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {'firmware_name': 'Marlin bugfix-2.0.x (Jan 31 2021', 'printer_port': '/dev/ttyUSB0', 'printer_baudrate': 115200}
2021-01-31 23:30:41,860 - octoprint.util.comm - INFO - Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
2021-01-31 23:30:41,864 - octoprint.util.comm - INFO - Telling the printer to set the busy interval to our "communicationBusy" timeout - 1s = 2s
2021-01-31 23:33:53,470 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.54
2021-01-31 23:43:44,593 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
  File "/home/octoprint/python_venvs/octoprint1/lib/python3.8/site-packages/octoprint/util/comm.py", line 3831, in _readline
    ret = self._serial.readline()
  File "/home/octoprint/python_venvs/octoprint1/lib/python3.8/site-packages/OctoPrint_MeatPack/packing_serial.py", line 182, in readline
    read = super(PackingSerial, self).readline(**kwargs)
  File "/home/octoprint/python_venvs/octoprint1/lib/python3.8/site-packages/serial/serialposix.py", line 595, in read
    raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2021-01-31 23:43:44,595 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2021-01-31 23:43:44,602 - 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:3831)"
2021-01-31 23:43:44,608 - octoprint.plugins.action_command_notification - INFO - Notifications cleared

Seems to be an issue with the "MeatPack" plugin. Don't know if the author, Scott, is on this forum, but I recommend taking it to the plugin GitHub repository. There already seems to be an issue that seems to be related; OctoPrint unable to connect to printer when plug-in is enabled · Issue #12 · scottmudge/OctoPrint-MeatPack · GitHub. It's probably a good idea to comment in there that you have the same issue, read the previous comments, and post your log there as well. Good luck :slight_smile:

Good catch on that, @scottmudge is on the forums. That would have been a really really useful thing to mention in the initial post, since it is basically re-writing the serial comms.

@PerfectlyInternal Test in safe mode, for sure, upload the full log (not just a snippet - the whole thing) and get in touch with the author. They've got some knowledgeable people from Marlin helping on that issue. They've apparently re-written a lot of the serial comms (source) in bugfix, which comes to my second recommendation:

If something is broken in a Marlin nightly build, roll back the the stable branch. They are not meant for production.

^ This tells us absolutely nothing about your firmware build.

1 Like

I installed MeatPack in hopes of improving SD upload speeds, the problem of losing serial connection was there well before it.

Well, the error shows MeatPack being part of the problem. Does it happen in safe mode as well?

1 Like

You need an appropriate firmware for MeatPack. It does not work with every Marlin firmware.

2 Likes

Can you check the messages log when the issue occurs?

I see on my log usb disconnections.

Bye