Print jobs randomly stop with a SerialException

Getting back to this.

With a real setup (all the noisy stuff running around the printer), the connection got unstable again, even with the shielded usb cable w/ ferrite cores. So I moved the motherboard outside the printer. It was better but still not sufficient.

Then while reading Marlin source code I stumbled upon this, which made a lot of sense. Since I was using the stock creality marlin firmware, I was stuck with 115200 baud rate, so I built the latest stable marlin, and configured it with #define BAUD_RATE_GCODE to be able to change baud rate without having to flash the firmware each time I wanted to try another rate. Surprisingly, the most stable rate for me is 250000, intuitively I would have though of the opposite, but I guess this has to do with harmonics.

So now I have something that is stable enough for short prints, but not enough for longer ones. The whole experience reminds me a lot of dealing with analog tv/radio as a kid : you hold the antenna while standing in weird positions and at some point you're being told "Ok don't move anymore, we have a signal" :slight_smile:

From now on, I'll iterate with this, find a better position for the motherboard, change the cable management, try different baud rates etc. Also the root cause is that I'm using a usb link between the printer and the computer running Octoprint, and I'll try to find an alternative, e.g. use an ESP01 connected to the motherboard's ICSP port (something like this maybe).