Communication goes offline after hours... on my ender5

What is the problem?

i got this error after some hours or minutes of jobs:
2021-02-20 19:22:13,117 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/octopi/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 3831, in _readline
ret = self._serial.readline()
File "/home/octopi/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 6455, in readline
c = self.read(1)
File "/home/octopi/OctoPrint/venv/local/lib/python2.7/site-packages/serial/serialposix.py", line 596, 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?)
2021-02-20 19:22:13,169 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2021-02-20 19:22:13,233 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:3831)"

What did you already try to solve it?
1.used an usb charger 3.1A
2.changed the power cable with a AWG28 (good quality uses with some device that needs more current)
3.changed the power supply with a specific model used with RPi 4 3A with usb type C connector and a HUB usb to connect it (it is not a good solution but i did't find other solution at home)

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

  • octoprint 1.5.3 installed 2 days ago
  • orange pi zero (dedicated)
  • creality ender 5 fw 1.1.6-3

two days ago i encountered the first disconnect issue
yesterday for example i was excited with octoprint and i decide to print 15 items for my children.
after 6 or 7 hours if fails again. i changed my power supply and it fails again and again.

from my OPi i got:

Feb 20 19:22:13 orangepizero kernel: [19213.911602] usb 6-1: USB disconnect, device number 2
Feb 20 19:22:13 orangepizero kernel: [19213.914404] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
Feb 20 19:22:13 orangepizero kernel: [19213.914559] ch341 6-1:1.0: device disconnected
Feb 20 19:22:13 orangepizero kernel: [19214.248570] usb 6-1: new full-speed USB device number 3 using ohci-platform
Feb 20 19:22:13 orangepizero kernel: [19214.477282] usb 6-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Feb 20 19:22:13 orangepizero kernel: [19214.477322] usb 6-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Feb 20 19:22:13 orangepizero kernel: [19214.477338] usb 6-1: Product: USB Serial
Feb 20 19:22:13 orangepizero kernel: [19214.479612] ch341 6-1:1.0: ch341-uart converter detected
Feb 20 19:22:13 orangepizero kernel: [19214.491992] usb 6-1: ch341-uart converter now attached to ttyUSB0

but what it is important is that i see my display reseatting and display again the creality logo.... i checked the logs and i see the disconnecting/reconnecting message above.

using the printer from SD it works like a charm.

i have also two question:
1) is it possible to write directly into my SD card ? because i tried to inizialize it but i see the sdcard always grayed.
2) is it possible to flash the firmware on my model ? because i read on the logs that it uses the Marlin firmware but i am not sure. what do you suggest ? it is safe to do this from octoprint with the reset issue ? what is the best method that anyone can suggest?

thanks a lot
bye

Hello @soldato !

First in all: Creality printers are known to have weird firmware and some hardware flaws.
You may search this forum.

Please do not use a charger. They are insufficient.

Please share the complete logs (octoprint.log and serial.log - preferably as files)

Sounds like the printer crashed or externally was reset - maybe bad firmware, or wiring in the printer that is making it crash.

the internal printer wiring i can exclude because printing direcly from SD works fine i done a lot of print (more than 50)

i suppose some firmware bugs but i don't have experience upgrading this kind of mainboard.

bye

Not quite. EMI can cause interference to the USB port only.

not really, the thing is even if it works via sd it might be prone to problems via serial connection.
You could try this for example

what it is strange is that i have 0% of resend. but i see with my eyes to a printer screen reboot. now i checked and reseated the cable into the screen. i will check into the blackbox where there are the mainboard.

i will continue to print an i will collect more data.

also in octoprint.log i didn't see resend of commands. or not ?

i have another doubt, because using an external power supply can create interference instead using direclty a +5V obtained from the printer internal power supply ? is this question already discussed ?

octoprint.log (430.2 KB)

That is why we need the serial.log

i need to enable serial port logging, for now the file is not available

1 Like

today after 3 hours print (3 items) it hanged again.

i attach the log.

but if i understand well the communication was interrupted without a retry. is it possible to implement a retry on connect when a serial goes offline? i think it is normal approach in this situation.

byeoctoprint.log.zip (53.3 KB) serial.log.2021-02-22_20-46-08.zip (2.6 MB)

At his point I would recommend to install a firmware directly from Marlin.
The Creality forks do have some evil quirks inside.

"Possible" yes, going to be implemented no.

I've explained this again and again in various locations all across issue tracker, forums and other places. There are usually two reasons why people request this.

One is that they don't want to have to reconnect themselves. To those I'd like to say, you certainly should be made aware if OctoPrint disconnects from your printer unexpectedly, because otherwise you'll have absolutely mysterious print failures to debug. Since OctoPrint can't know whether you pulled the cable intentionally or the connection got interrupted due to some kind of error deep within the serial interface (both look completely the same), it'll err on the side of caution and treat every disconnect as "something unusual just happened, requesting human intervention". It can't blindly reconnect because that could actually cause further disruption due to a high probability of resetting the printer (which it can't prevent from happening, if the printer is hardwired to reset on serial connect, it is hardwired). The best course of action when facing a complete loss of communication here is holding its feet still and hoping for prompt handling of things by a human operator. Unless you intentionally pull out the cable, a loss of serial connectivity should always be investigated and solved, it's not a "harmless issue" that can just be ignored and hints at an actual failure in the setup.

The other reason people request this is "automatic print recovery" and that is a way more complicated issue than most people intuitively think. OctoPrint doesn't know what your printer has been doing. It sends lines to it, but those get buffered by the printer. The buffer size is usually unknown and thus OctoPrint cannot possibly know how many of the lines it sent have actually been processed/printed when a disconnect happens. So it can't actually continue. Additionally, upon reconnect there's a high likelihood of a printer reset - heaters turn off, position information and leveling data gets lost. In short, the nozzle is now somewhere and there's no way to get it back exactly where it needs to be to resume a disrupted print. And since the heaters are off, chances are also that the print now detaches. So this is rarely going to work either.

2 Likes

i agree with at 100% , now i have a complete idea of the issue when it fails and you resume printing.

in this case for long print it is better to print direcly from SD card. right?

but in my case i cannot initialize the SD card ..... is it a "bad" feature of creality fw or is it a feature that require some special HW ?

i am a newbie in 3Dprinter but not on electronics/microsystems and information technology.
my fear is to brick my board for example and waste money

how many possibility there are to brick a board ?

because for example today i used avrdude on my laptop only to backup my board just for testing usb/serial and the board reset twice.

i read a lot of thread but i am not sure about the required steps and the recovery plan in case of errors.
furthermore i didn't understand what is my board exactly for now, i see that the creality fw is 1.1.6-3 and it reports also the Marlin name but that's all. also octorprint reports Marlin. But is it a fork of Marlin fw created by creality ?

the doubt is i need to remain in 1.1.x ? or i can switch to 2.x.x ?

bye

Correct, the firmware was forked by Creality and then changed.

Because of Creality's fork the versioning does not match the official Marlin branches for some reason I think. I believe their firmware are based on the newer 2.0.x line from official Marlin.

improper grounding and polarity faults WILL cause USB communication errors, see my post below.

It sounds like a power issue if the Ender is resetting. Could it be the 5v line in the usb cable ? Maybe try clipping the red 5v line inside the usb cable so as to make sure 5v regulators are not fighting.

The two issues I have located on this subject have been earth loops causing different potentials on the Pi and the printer, and wall warts without a true reference to ground causing a difference of potential the other way. Tying the ground of the main board and the Pi with the USB cable and the pin 1 5v isolated helps minimise the noise.

As to the flashing, once you have the bootloader loaded, which isn't a big deal, the rest of it works well. If you're on the v1 boards, look at upgrading to the v4.2.7 board, fairly cheap and gives you significant scope to address firmware issues. The 4.2.7 board has the bootloader loaded and a SD card upgrade of the firmware is as easy as turning the machine on. I went through this last week and the change was amazing. And simple to achieve. Replace the board, load the firmware, update the e-steps, go.

https://marlin.crc.id.au/ has daily builds of the appropriate Ender 3 firmware so you don't have to build this yourself and works out of the box (does require a subscription, worth every $)

Or insulation taping over pin 1... Easier and effective.