Prints stop with error in serial connection

Since serveral months I’m experiencing prints that just stop somewhere in between (around 1 of 5 prints) with the toolhead stopped moving around.
I print from Octoprint and from time to time from the display.
I checked the Octoprint serial log which directed me to serial connection errors (and Making sure you're not a bot! ). I checked the connectors, changed cables, removed everything else from the Raspi, but nothing helped.
Then I observed messages on the touch screen, that it lost connection to the printer. Since these messages disappears automatically, you can only see them by luck.
Both devices then stop the print, but keep bed and nozzle heated - even the whole night !
Since both devices are connected via USB (Mini and C) to the Controller, my suspicion now focuses on the USB part of the controller, because the behavior is the same for both print controlling devices.

Any ideas or hints how to proceed with problem analysis and how to fix ?
Thanks
Uef

Extract from Octoprint serial log around the event:
2026-10-27 13:37:45,341 - Send: N43521 G1 X87.661 Y240.31 E.0130190
2026-10-27 13:37:45,527 - Recv: ok
2026-10-27 13:37:45,529 - Send: N43522 G1 X87.743 Y240.576 E.0153
90
2026-10-27 13:37:45,702 - Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: ‘device reports readiness to read but returned no data (device disconnected or multiple access on port?)’ @ comm.py:_readline:4177
2026-10-27 13:37:45,703 - Please see Making sure you're not a bot! for possible reasons of this.
2026-10-27 13:37:45,751 - Changing monitoring state from “Printing” to “Offline after error”
2026-10-27 13:37:45,784 - Connection closed, closing down monitor
2026-10-27 13:38:06,061 - Changing monitoring state from “Offline” to “Opening serial connection”
2026-10-27 13:38:06,076 - Connecting to port /dev/ttyUSB0, baudrate 115200
2026-10-27 13:38:06,116 - Changing monitoring state from “Opening serial connection” to “Connecting”
2026-10-27 13:38:06,118 - Connected to: Serial<id=0xa5a3b760, open=True>(port=‘/dev/ttyUSB0’, baudrate=115200, bytesize=8, parity=‘N’, stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2026-10-27 13:38:06,138 - Send: N0 M110 N0125
2026-10-27 13:38:06,160 - Recv: echo:Unknown command: “ŊüYy¿Œ^@è©ýCþ2üÆN0 M110 N0”
2026-10-27 13:38:06,162 - Recv: ok
2026-10-27 13:38:06,165 - Send: N0 M110 N0
125
2026-10-27 13:38:06,167 - Changing monitoring state from “Connecting” to “Operational”
2026-10-27 13:38:06,205 - Recv: ok
2026-10-27 13:38:06,207 - Send: N0 M110 N0125
2026-10-27 13:38:06,225 - Recv: ok
2026-10-27 13:38:06,233 - Send: N1 M115
39
2026-10-27 13:38:06,255 - Recv: FIRMWARE_NAME:Marlin SM2-4.7.2 (Github) SOURCE_CODE_URL:https://github.com/whimsycwd/SnapmakerMarlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:GD32F305VGT6 EXTRUDER_COUNT:2 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
2026-10-27 13:38:06,274 - Recv: Cap:SERIAL_XON_XOFF:0
2026-10-27 13:38:06,288 - Recv: Cap:BINARY_FILE_TRANSFER:0
2026-10-27 13:38:06,577 - Recv: Cap:EEPROM:1
2026-10-27 13:38:06,580 - Recv: Cap:VOLUMETRIC:0
2026-10-27 13:38:06,582 - Recv: Cap:AUTOREPORT_TEMP:1
2026-10-27 13:38:06,585 - Recv: Cap:PROGRESS:0
2026-10-27 13:38:06,588 - Recv: Cap:PRINT_JOB:1
2026-10-27 13:38:06,590 - Recv: Cap:AUTOLEVEL:0
2026-10-27 13:38:06,592 - Recv: Cap:Z_PROBE:1
2026-10-27 13:38:06,594 - Recv: Cap:LEVELING_DATA:1
2026-10-27 13:38:06,597 - Recv: Cap:BUILD_PERCENT:0
2026-10-27 13:38:06,600 - Recv: Cap:SOFTWARE_POWER:0
2026-10-27 13:38:06,602 - Recv: Cap:TOGGLE_LIGHTS:0
2026-10-27 13:38:06,604 - Recv: Cap:CASE_LIGHT_BRIGHTNESS:0
2026-10-27 13:38:06,606 - Recv: Cap:EMERGENCY_PARSER:0
2026-10-27 13:38:06,608 - Recv: Cap:PROMPT_SUPPORT:0
2026-10-27 13:38:06,610 - Recv: Cap:AUTOREPORT_SD_STATUS:0
2026-10-27 13:38:06,612 - Recv: Cap:THERMAL_PROTECTION:1
2026-10-27 13:38:06,614 - Recv: Cap:MOTION_MODES:0
2026-10-27 13:38:06,617 - Recv: Cap:CHAMBER_TEMPERATURE:0
2026-10-27 13:38:06,619 - Recv: ok
2026-10-27 13:38:06,621 - Send: M21
2026-10-27 13:38:06,627 - Recv: echo:Unknown command: “M21”
2026-10-27 13:38:06,630 - Recv: ok
2026-10-27 13:38:06,633 - Send: M851
2026-10-27 13:38:06,640 - Recv: echo:Probe Z Offset: -0.05
2026-10-27 13:38:06,642 - Recv: ok
2026-10-27 13:38:06,660 - Send: M155 S2
2026-10-27 13:38:06,677 - Recv: ok
2026-10-27 13:38:08,674 - Recv: T:236.40 /235.00 B:69.63 /70.00 T0:236.40 /235.00 T1:0.00 /0.00 @:16 B@:127 @0:16 @1:0
2026-10-27 13:38:10,675 - Recv: T:236.50 /235.00 B:69.63 /70.00 T0:236.50 /235.00 T1:0.00 /0.00 @:15 B@:127 @0:15 @1:0
2026-10-27 13:38:12,674 - Recv: T:236.20 /235.00 B:69.67 /70.00 T0:236.20 /235.00 T1:0.00 /0.00 @:18 B@:127 @0:18 @1:0
2026-10-27 13:38:14,675 - Recv: T:236.10 /235.00 B:69.86 /70.00 T0:236.10 /235.00 T1:0.00 /0.00 @:18 B@:127 @0:18 @1:0
2026-10-27 13:38:16,675 - Recv: T:235.70 /235.00 B:70.00 /70.00 T0:235.70 /235.00 T1:0.00 /0.00 @:21 B@:127 @0:21 @1:0
2

Some remarks first: The Touchscreen is connected via a USB-C plug, but actually this is not a USB connection. They just used the plug type (see Can Android on touchscreen be more open? - #60 by Hauke for details if you’re interested - ). And: If the touchscreen says “connection lost”, this is that the HMI application on the touchscreen did not receive a reply from the controller in a timely fashion, and in your case most likely is not a problem, as your touchscreen is not processing the print, but your raspberry does.

That said: You posted the beginning of your serial log - the end actually would be more interesting. Can you post that?

Thanks Hauke for your reply.
Let me fill the gaps of my initial post.

  • The Octoprint log extract above show the communication around the stop (= the end): the first 2 lines are the last command, that was successful. The issue begins with “Send: N43522 G1 X87.743 Y240.576 E.015390”. The connection up again around “Changing monitoring state from “Connecting” to “Operational””, but the print is already halted.
  • I have the same behavior of the printer, when printing from the touchscreen: same probability, same reaction (job doesn’t resume), except that I have no log I can check (at least to my knowledge). I may try to check whether Octoprint receives the UART communication between touchscreen and controller and logs it, unless their might be a better way to check the touchscreens communication. The controller seems obviously “broadcasts” to both USB interfaces (using the UART protocol; thanks for the clarification)
  • The situation, when the touchscreen shows “connection lost” is when the printer is idle.
    My assumption: as the touchscreen continously show the i.e. the temperatures on its home screen, it need to ping the controller or at least listen to the controller’s status stream (see end of the log), which resumes after the disconnect.
    So in the idle case, the touchscreen detect the disconnect, shows a warning message on the home screen, but doesn#T care any longer, once the stream resumes. In case of a print, the same disconnect is classified as critical error (which it is) and the print job is halted completely

Long story short: my picture so far:
both - Raspi and touchscreen - connect via UART to the controller and experience the same issue, although they “report” it in different ways, but react the same kind on the critical error during prints.

So the focal point for me would the controller, but I have no idea how to proceed.
Is it a hardware issue (like UART overheated or bad solder) or software (undefined havior because of i.e. overload) ?

Try to export the logs and take a look and share it here (yes I’m not sure it would bring some light but it’s a chance anyway):

Here are the 6 log files, which I downloaded from my SM 2.0.
One of the events can (probably) seen starting in line 5396 (6:43:53) of FW_36.log, and it happens around 25 mins after a new print started in line 5365 (6:10:28, I pasted this parted below).
But I’m not sure, whether this helps to identify a root cause.

1793081428472,2026.10.27 06:10:28.472,INFO,SC-FW,SC req enclosure sta
1793081437164,2026.10.27 06:10:37.164,INFO,SC-FW,Set Cross Light: OFF
1793081441655,2026.10.27 06:10:41.655,INFO,SC-FW,SC req is leveled:1
1793081442551,2026.10.27 06:10:42.551,INFO,SC-FW,SC get env: 4
1793081442553,2026.10.27 06:10:42.553,INFO,SC-FW,live z offset: 0.000
1793081442556,2026.10.27 06:10:42.556,INFO,SC-FW,SC req enclosure sta
1793081442596,2026.10.27 06:10:42.596,INFO,SC-FW,new laser power: -1.00
1793081442599,2026.10.27 06:10:42.599,INFO,SC-FW,SC req START work
1793081442616,2026.10.27 06:10:42.616,INFO,SC-FW,SC req → Success
1793081442973,2026.10.27 06:10:42.973,INFO,SC-FW,new B target temp: 70
1793081442974,2026.10.27 06:10:42.974,INFO,SC-FW,new E target temp: 165
1793081442975,2026.10.27 06:10:42.975,INFO,SC-FW,leveling OFF
1793081443941,2026.10.27 06:10:43.941,INFO,SC-FW,enable nozzle fan
1793081443943,2026.10.27 06:10:43.943,INFO,SC-FW,fan_index: 1, speed: 255
1793081481485,2026.10.27 06:11:21.485,INFO,SC-FW,leveling ON
1793081481498,2026.10.27 06:11:21.498,INFO,SC-FW,Apply hotend[0] Z offset: 0.00
1793081498264,2026.10.27 06:11:38.264,INFO,SC-FW,new B target temp: 70
1793081768990,2026.10.27 06:16:08.990,INFO,SC-FW,leveling OFF
1793081788618,2026.10.27 06:16:28.618,INFO,SC-FW,leveling ON
1793081788619,2026.10.27 06:16:28.619,INFO,SC-FW,Apply hotend[0] Z offset: 0.00
1793081788620,2026.10.27 06:16:28.620,INFO,SC-FW,new E target temp: 250
1793081829769,2026.10.27 06:17:09.769,INFO,SC-FW,new E target temp: 250
1793081831735,2026.10.27 06:17:11.735,INFO,SC-FW,fan_index: 0, speed: 255
1793081831747,2026.10.27 06:17:11.747,INFO,SC-FW,new E target temp: 240
1793081831750,2026.10.27 06:17:11.750,INFO,SC-FW,fan_index: 0, speed: 0
1793081842991,2026.10.27 06:17:22.991,INFO,SC-FW,new E target temp: 235
1793081852854,2026.10.27 06:17:32.854,INFO,SC-FW,fan_index: 0, speed: 127
1793081876445,2026.10.27 06:17:56.445,INFO,SC-FW,set extruder0 live_z_offset: -0.050000
1793081878502,2026.10.27 06:17:58.502,INFO,SC-FW,extruder: 0, new live Z: -0.050, delta: -0.050
1793081895947,2026.10.27 06:18:15.947,INFO,SC-FW,set extruder0 live_z_offset: -0.100000
1793081898004,2026.10.27 06:18:18.004,INFO,SC-FW,extruder: 0, new live Z: -0.100, delta: -0.050
1793083433266,2026.10.27 06:43:53.266,ERROR,SC-FW,wait gcode pack timeout and req:761
1793083434269,2026.10.27 06:43:54.269,ERROR,SC-FW,wait gcode pack timeout and req:761
1793083435273,2026.10.27 06:43:55.273,ERROR,SC-FW,wait gcode pack timeout and req:761
1793083436280,2026.10.27 06:43:56.280,ERROR,SC-FW,wait gcode pack timeout and req:761
1793083437284,2026.10.27 06:43:57.284,ERROR,SC-FW,wait gcode pack timeout and req:761
…

After I found out, that the print stopped, I cancelled it at 07:35:59.638:

…
1793086558306,2026.10.27 07:35:58.306,ERROR,SC-FW,wait gcode pack timeout and req:761
1793086559310,2026.10.27 07:35:59.310,ERROR,SC-FW,wait gcode pack timeout and req:761
1793086559638,2026.10.27 07:35:59.638,INFO,SC-FW,SC req STOP
1793086559707,2026.10.27 07:35:59.707,INFO,SC-FW,SC req → Success
1793086559708,2026.10.27 07:35:59.708,INFO,SC-FW,new B target temp: 0
1793086559709,2026.10.27 07:35:59.709,INFO,SC-FW,new E target temp: 0
1793086559710,2026.10.27 07:35:59.710,INFO,SC-FW,new E target temp: 0
1793086559711,2026.10.27 07:35:59.711,INFO,SC-FW,fan_index: 0, speed: 0
1793086559721,2026.10.27 07:35:59.721,INFO,SC-FW,QS recorded pos X: 0.000, Y: 0.000, Z: 0.000, E: 0.000
1793086559722,2026.10.27 07:35:59.722,INFO,SC-FW,QS at logical pos: X: 198.663, Y: 289.450, Z: 0.321, E: 4060.360
1793086559723,2026.10.27 07:35:59.723,INFO,SC-FW,leveling OFF
1793086596540,2026.10.27 07:36:36.540,INFO,SC-FW,leveling ON
1793086596563,2026.10.27 07:36:36.563,INFO,SC-FW,Finish stop

Question is, where to go from here ?

Log files.zip (739.8 KB)

try one print from the touchscreen with the pi completely unplugged, not just idle. if it still stalls that rules out the usb serial side and points at the controller itself.

Thanks.
I already tried this, and disconnected the Raspi completely for 2 weeks, just to experience same issue from the touchscreen (may be with a little bit lower frequency).
I also downloaded the failed gcode file from Octoprint and uploaded it to the touchscreen: sometimes it worked then (directing me to Octoprint as the root cause, although I already tuned this with i.e. cutting the +5V connection on the USB cable to avoid problems from voltage potential differences), sometimes it failed the same way (which put the gcode/Slicer under the spotlight).
The tricky thing is that the behavior is not deterministic.

If nobody else has this issue to this extend, I suspect this to be a controller HW issue vs. firmware. If the issue is in the firmware, I would expect more complains from out there.
I’ll check the controller board. Since I already repaired controllers by replacing level shifters for the CAN bus, there may be a chance.

Could it be that your gcode has something in line 761 or any bad comments?
I would need to see in the controller source what causes this text to be brought to the log to analyse..

OK, the fact that the touchscreen shows “connection lost” with everything sitting idle indeed hints at a hardware problem in the controller. I guess the fastest fix would be getting a new controller. If you have an oscilloscope or logic analyzer at hand, of course you could do a bit of signal quality measurement. As both serial interfaces show the same problem, I’d guess it is something with the MCU, which I guess is relatively difficult to replace, but another culprit might be general power stability, so I’d perhaps monitor the voltages on the controller board. Oh, and another thing might be worth looking at: The controller consists of two boards that are connected via a few 2.54 mm raster pin connectors - perhaps they just need a jolly good cleaning from some corrosion that built up over time…

not sure this is it but that req:761 repeating every second in your log looks less like a bad line and more like the touchscreen waiting on the same pack, which fits the hardware side hauke mentioned.