Losing connection randomly

What is the problem?

Serial connection drops out almost randomly.

What did you already try to solve it?

yes, changed power supply, usb cable.

Have you tried running in safe mode?

no, it is random.

Did running in safe mode solve the problem?

no

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)
octoprint.log (42.6 KB)
serial.log (740 Bytes)

Ender 3 pro
Octo print Version 1.8.6
Octo Pi Version 0.18.0

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

It has never lost connection while printing yet, when I notice it is if the bed is heating up and it reaches desired temp it disconnects, I believe it happened once when hotend reached the set temp also. I have the pi 3 setup to run two printers but one is not connected at this time.

sudo nano /etc/udev/rules.d/99-usb.rules

#Tevo3pro
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.3", SYMLINK+="Tevo3pro"

#ender3
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{devpath}=="1.5", SYMLINK+="Ender3pro"

I can't duplicate the issue it is random. Based on the logs do ya'll see anything that may lead me to the right direction? I'm wondering if its a voltage issue, I tried swapping the power supply feeding the pi but still have the issue. I will try monitoring voltage and see if I can see it drop out at any point.

2022-12-29 00:31:40,169 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2022-12-29 00:31:40,273 - octoprint.util.comm - INFO - Firmware states that it supports emergency GCODEs to be sent without waiting for an acknowledgement first
2022-12-29 00:34:27,399 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 3997, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 6672, in readline
c = self.read(1)
File "/home/pi/oprint/lib/python3.7/site-packages/serial/serialposix.py", line 596, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2022-12-29 00:34:27,406 - octoprint.util.comm - ERROR - Please see OctoPrint randomly loses connection to the printer with a "SerialException" - FAQ - OctoPrint Community Forum for possible reasons of this.
2022-12-29 00:34:27,425 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Offline after error"

octoprint.log (42.6 KB)
serial.log (740 Bytes)

Hello @arun2118 !

Please send the complete systeminfo bundle. Also, the serial log is empty. Have a look.

You have undervoltage issues:

2022-12-28 22:33:48,400 - octoprint.plugins.pi_support - WARNING - This Raspberry Pi is reporting problems that might lead to bad performance or errors caused by overheating or insufficient power.
!!! UNDERVOLTAGE REPORTED !!! Make sure that the power supply and power cable are capable of supplying enough voltage and current to your Pi.

And most important: What printer do you use?

octoprint-systeminfo-20221229073603.zip (79.1 KB)
serial.log (12.5 KB)

Ender 3 pro 4.2.2 board.

I see, I have enabled it and am running it now trying to get it to fail....It has failed on first attempt new upload attached.
Each time I'm noticing it loses connection when bed reaches set temp?

Yes I am aware and have changed out the power supply where no undervoltage warning is displayed but it still fails.

Looking at the log I see something else may be trying to use the same USB port?

Connected to: Serial<id=0x6f63c250, open=True>(port='/dev/ttyUSB0',

I see it connected to ttyUSB0 but it should have connected to Tevo3pro

I changed Serial Port to Tevo3pro and i'm testing now. Thank you for your help Ewald_Ikemann

Failed again

2022-12-29 09:19:23,455 - octoprint.plugins.firmwareupdater - INFO - Run postflash flag is not set
2022-12-29 09:19:23,581 - octoprint.plugins.firmwareupdater - INFO - Setting BINARY_FILE_TRANSFER capability to True
2022-12-29 09:19:23,700 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2022-12-29 09:19:23,911 - octoprint.util.comm - INFO - Firmware states that it supports emergency GCODEs to be sent without waiting for an acknowledgement first
2022-12-29 09:19:39,795 - octoprint.util.comm - INFO - Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
2022-12-29 09:20:12,048 - octoprint.timelapse - WARNING - Cannot capture image, image number is unset
2022-12-29 09:21:15,421 - octoprint.plugins.action_command_notification - INFO - Got a notification: Settings Stored
2022-12-29 09:21:15,651 - octoprint.util.comm - INFO - Telling the printer to set the busy interval to our "communicationBusy" timeout - 1s = 2s
2022-12-29 09:22:10,625 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 3997, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 6672, in readline
c = self.read(1)
File "/home/pi/oprint/lib/python3.7/site-packages/serial/serialposix.py", line 596, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2022-12-29 09:22:10,635 - octoprint.util.comm - ERROR - Please see OctoPrint randomly loses connection to the printer with a "SerialException" - FAQ - OctoPrint Community Forum for possible reasons of this.
2022-12-29 09:22:10,655 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Offline after error"
2022-12-29 09:22:10,696 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2022-12-29 09:22:51,669 - octoprint.plugins.softwareupdate - INFO - Cleaned up -5 old update log entries
2022-12-29 09:22:51,670 - octoprint.plugins.softwareupdate - INFO - Loaded update log from disk

EDIT

When I was having a similar problem (Pi4 would lose both camera and printer simultaneously), it turned out that the temp of the voltage/power regulator for the Pi 4's USB ports was causing the USB subsystem to reset sporadically. I switched the camera from doing 1024x768 30fps to doing 800x600 10fps, and that reduced the power draw on the USB bus, and the the random USB resets stopped. There were messages in /var/log/syslog about the USB subsystem that led me to this conclusion.

Another thing that might be abusing the usb power is the printer itself. If you haven't taped over the 5V pin on the USB cable connecting printer and the Pi, then if the printer's 5v rail dips for some reason, then the printer will start to draw power from the Pi... and if it draws to much that can also cause the USB subsystem to reset. There is a help article on how to keep this from happening (basically you tape over the 5v pin on the end of the USB cable that plugs into the Pi, and that means that the printer can't draw power from the Pi.)

I have only the two printers connected to the usb ports on the pi, and the other printer has no issues, the usb 5v is taped. what's strange is it happens only when the heat bed reaches set temp. I will take a closer look at all the wiring and may need to pull out the scope.

Your last comment makes it sound like maybe it is related to inductive feedback from a relay or something like that. Is the bed heater triggered by a relay. If it is, I would look to ensure that you have a working reversed diode across the coil. I am not sure if the bed header itself would produce inductive feeb back but maybe. If they do, likely there is a diode there to absorb it. It could also be bad. Inductive feedback can cause all kinds of strange things.

I would advice to do it anyway.

I have also had "random" disconnects. While printing it seems to happen a lot when I return to my browser after a while. The print will continue as normal, just cannot monitor it or even get to the server. Have to switch off Pi4 without shutdown because of it. Reconnect after restart is normal. Seems very glitchy to my.

This is not the same problem as this topic, the OP gets an error in the UI and their printer disconnects (which will kill any prints). If your print continues but you can't access the server, then that sounds more like a network issue.


Found 3.3v on board browns out when heat bed reaches set temp, then measured the power supply and found it doing the same. Not sure why only when it reaches set temp. Replaced power supply and it is working no issues. Thanks everyone for your support.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.