Communication timeout while printing. Not a marlin bugfix firmware issue

The bug is just about having an sd card in your printer - not printing from it.
We saw all kinds of weird things happen.. For example some couldn't connect to the printer at all, others couldn't home when connected to usb etc..

We have have a list of things you can try and check - hopefully one of them will solve your problem.

ive ruled all of those things out. I did a full-upgrade on my pi and im trying a print now. If that doesnt work then ill go back to an earlier version of octoprint and try again. if that doesnt work... im out of ideas lol. This is really strange. There were no changes to any of my hardware or software except for the octoprint update prior to this issue, but i read other threads where people rolled back to older versions and still continued having similar issues (which all started around the same time period oddly enough), so I dont see what could possibly be causing this. Is it possible that the octoprint update could have broken something that reverting back to the older version is unable to fix? Do the plugin versions need to be rolled back along with the octoprint version perhaps? I feel like im in the twilight zone lol.

Have you tried Marlin 2.0.7.1 ?

No. I was using a bugfix version without issue for 4 months and then i changed to the latest stable release after this issue started. I really dont think that firmware has anything to do with it because the issue would've presented itself a long time ago, but ill change again to an earlier version if all else fails.

1 Like

There's a myriad of things that can cause issues like this. It all boils down to "OctoPrint doesn't get any sign of life from your firmware anymore" though.

As usual, when something started "with an update", it helps to know from what version you update from. What I can tell you is that between 1.4.x and 1.5.x, the only serial related change was the introduction of resend request counting. No updated pyserial dependency or anything like that. So IF that is somehow related to something surrounding an 1.4.x to 1.5.x update, I have absolutely no idea what it could be, and also have not seen any such issues myself.

The density of Ender 3 users with issues like these seems to be quite high, but that could also just be due to the popularity of this particular model, at least once the usual stock firmware shenanigans are ruled out.

I update octoprint every time theres a pop-up saying that an update is available, and I use octoprint almost every day. So I guess I updated from 1.5.2 to 1.5.3.
Anyway, I tried another print after I did the full-upgrade on my pi and it still failed (I saw that someone said that it fixed their problem), and now I am currently printing after having went back to octoprint version 1.5.0. If this print fails then I will flash my firmware to an earlier stable release of marlin.
If that fails then I guess I will have to start replacing hardware.
By the way, do i still need the "2x temperature reporting" plugin if im not using creality stock firmware? I build my own firmware from the marlin github.

That makes it even more unlikely that the update is involved, because the only changes there were two bugfixes in the pluginmanager specifically.

No. It's only relevant on Creality firmware with that bug.

Update: I’ve tried everything. I even switched the firmware to Klipper and had the same issue. I’m going to replace the usb cable and test again. If it still fails, I’m just going to replace the board. Don’t know what else to do. If octoprint isn’t causing this, and I don’t think it is, then there has to be something wrong with the hardware.

Stab in the dark: do the failures happen when someone turns on/off a light somewhere on the same circuit your pi/Ender are on? That was the issue in my case. I suspect the change in load causes a phase shift in the power and somehow that's enough to disrupt the serial connection. I have a new, actively filtered power supply now (Mean Well) but haven't installed it yet, so not yet sure if that will fix it...

Back when I was using the 8 bit board I also noticed that the board got more sensible for emi when the cables in the "mainboardbox" were aligned in a certain way.
Had no issues -> took out the board and put it back in -> big issues
I unfortunately can't tell you which cables caused it because I switched to a skr 1.4 turbo and the problems were gone...

1 Like

Like this one:

1 Like

I had similar problems with my ender 3 and bigtreetech E3 V2 board I found that merlin set the internal serial port as a priority port.
as shown below, configuration.h

#define SERIAL_PORT 0

/**

  • Select a secondary serial port on the board to use for communication with the host.
  • :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
    */
    //#define SERIAL_PORT_2 -1

I changed the the serial port allocation to give priority to the external (USB) port as below.

#define SERIAL_PORT 2

/**

  • Select a secondary serial port on the board to use for communication with the host.
  • :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
    */
    #define SERIAL_PORT_2 -1

I have not had any more problems with comms since.

Bill

1 Like

I had the same problem for a long time. A simple trick with an extension cord fixed it for med so I did this thing on Thiniverse. Zero problemes since then.
OctoPrint disconnect fix (SerialException)

Interesting approach to fixing EMI issues. I've heard similar things when people had their printer close to a freezer and when the compressor kicked on it would kill the pi's connection.

I have now installed the new PSU and I can report back that it was not enough to power only the Ender off this PSU, I put in a buck converter to go from 24v to 5v so that I could also power the Pi from this actively filtered PSU, and I haven't had a problem since. (My problem was not with just the Ender PSU or the pi PSU, I had to feed them both a clean voltage to make it work. Go figure.)

Winding coils is a common method in HF technology to suppress EMI. It depends of the frequency if the use of a coil or a ferrite bead is more useful. Sometimes the coils are wound around a ferrite ring.

Yeah, I just never thought to do it with an extension cord before.

And if there's any chance there is a somewhat larger load on the extension cord, you really shouldn't do that.

1 Like

Yes. Those are always better:

Just a heads up that I have been investigating the issue of intermittent communication errors, timeouts, exceptions between my raspberry pi and ender 3v2 printer and have noticed excessive electrical noise on the +5v supply to the raspberry from the 3amp raspberry power adaptor (3.3v vcc derived from this). Not sure what the source of rhe noise is yet (printer, raspberry or mains supply) but have fitted extra smoothing/filtering to the internal raspberry board to reduce it while l test to see if the situation is resolved. Will do a separate post once l figure it out as believe this issue quite widespread. Cheers