Not (only) an Octoprint problem but

What is the problem?

The printing process freezes with serial communication errors typically within 5-30 minutes of the print starting.

What did you already try to solve it?

  • Removed my own plugin
  • Increased timeouts
  • Examined G-code for anything that looked odd- tried another model
  • Checked the same g-code printed ok from sd card
  • Reinstalled Octopi completely from a fresh image
  • replaced cable (twice)
  • double-checked power supply rating
  • the kicker- installed Repetier and tried to print from PC on yet another new cable - still failed in a simlar way.

My suspicion is that Marlin 2.0.5 on the printer is either misconfigured or has a bug- hence I don't think this is an Octoprint fault. Reporting it here mainly in case it helps anyone else in the community who might be swearing at Octoprint unfairly! (and of course, on the off-chance that someone actually knows the answer).

2020-07-21 21:54:32,960 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-07-21 21:54:32,981 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2020-07-21 21:54:32,985 - octoprint.server - INFO - OctoPrint 1.3.12
2020-07-21 21:54:33,001 - octoprint.plugin.core - INFO - 15 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Error Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  Force Login (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/forcelogin
|  Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
|  Pi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
|  Printer Safety Check (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check
|  Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
2020-07-21 21:54:33,023 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|    cores: 4
|    freq: 1200.0
|    ram: 917016576
|  os:
|    id: linux
|    platform: linux2
|  plugins:
|    pi_support:
|      model: Raspberry Pi 3 Model B Rev 1.2
|      octopi_version: 0.17.0
|  python:
|    pip: 19.3.1
|    version: 2.7.16
|    virtualenv: /home/pi/oprint
2020-07-21 21:54:33,023 - octoprint.server - INFO - ------------------------------------------------------------------------------

<deleted some stuff here that didn't look relevant>

2020-07-21 22:35:16,231 - octoprint.plugins.announcements - INFO - Loaded channel _plugins from https://plugins.octoprint.org/feed.xml in 0.31s
2020-07-21 22:35:16,845 - octoprint.server.api - ERROR - Error calling SimpleApiPlugin pluginmanager
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/__init__.py", line 68, in pluginData
    response = api_plugin.on_api_get(request)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 280, in on_api_get
    if refresh_repository or not self._is_repository_cache_valid():
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 797, in _is_repository_cache_valid
    return mtime + self._repository_cache_ttl >= time.time() > mtime
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
2020-07-21 22:35:16,852 - tornado.access - ERROR - 500 GET /api/plugin/pluginmanager (::ffff:192.168.1.109) 15.37ms
2020-07-21 22:35:17,012 - octoprint.server.util.sockjs - INFO - User octopi logged in on the socket from client ::ffff:192.168.1.109
2020-07-21 22:35:25,898 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 2454}
2020-07-21 22:35:26,142 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {'plugins': u''}
2020-07-21 22:35:26,419 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.16', 'ram': 917016576, 'octopi_version': '0.17.0', 'version': u'1.3.12', 'pip': '19.3.1', 'cores': 4, 'freq': 1200.0, 'pi_model': 'Raspberry Pi 3 Model B Rev 1.2', 'os': 'linux'}
2020-07-21 22:39:32,972 - octoprint.server.heartbeat - INFO - Server heartbeat <3
                                                                                                                            2020-07-21 22:28:14,361 - octoprint.startup - INFO - ******************************************************************************
2020-07-21 22:28:14,363 - octoprint.startup - INFO - Starting OctoPrint 1.3.12
2020-07-21 22:28:14,364 - octoprint.startup - INFO - ******************************************************************************
2020-07-21 22:28:15,224 - octoprint.startup - INFO - We don't appear to be online, not fetching plugin blacklist

| Recv: ok
| Send: N15489 G1 X153.15 Y104.264 E2412.78248*97
| Recv: Error:checksum mismatch, Last Line: 15488
| Recv: Resend: 15489
2020-07-22 14:10:36,097 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 16409, current line = 16410
| Last lines in terminal:
| Send: N16401 G1 X106.917 Y127.172 E2527.5357*110
| Recv: ok
| Send: N16402 G1 X106.802 Y126.877 E2527.56571*81
| Recv: ok
| Send: N16403 G1 X106.617 Y126.623 E2527.5955*105
| Recv:  T:239.14 /240.00 B:69.98 /70.00 @:127 B@:44
| Recv: ok
| Send: N16404 G1 X106.372 Y126.423 E2527.62548*91
| Recv: ok
| Send: N16405 G1 X106.083 Y126.293 E2527.65552*86
| Recv: ok
| Send: N16406 G1 X105.761 Y126.24 E2527.68645*107
| Recv: ok
| Send: N16407 G1 X105.519 Y126.277 E2527.70966*84
| Recv: ok
| Send: N16408 G1 X105.155 Y125.659 E2527.77764*87
| Recv: ok
| Send: N16409 G1 X104.13 Y123.835 E2527.97597*102
| Recv: Error:checksum mismatch, Last Line: 16408
| Recv: Resend: 16409
2020-07-22 14:15:36,566 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2020-07-22 14:15:39,586 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2020-07-22 14:15:42,594 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2020-07-22 14:15:43,616 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Pausing"
2020-07-22 14:15:45,615 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2020-07-22 14:15:51,627 - octoprint.util.comm - INFO - No response from printer after 6 consecutive communication timeouts, considering it dead.
2020-07-22 14:15:51,684 - octoprint.util.comm - INFO - Changing monitoring state from "Pausing" to "Offline (Error: Too many consecutive timeouts, printer still connected and alive?)"
2020-07-22 14:15:52,013 - octoprint.plugins.tracking - INFO - Sent tracking event commerror_timeout, payload: {'commerror_text': u'Too many consecutive timeouts, printer still connected and alive?'}
2020-07-22 14:16:02,917 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial port"
2020-07-22 14:16:02,925 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Connecting"
2020-07-22 14:16:02,935 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-07-22 14:16:32,973 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-07-22 14:16:42,990 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Offline"

WRITE HERE

Additional information about your setup

  • Sapphire Pro
  • Marlin 2.0.5 (I can post the configuration's) using stock Robin Nano board (except for TMC2208 on extruder).
  • Raspi 3B running from Samsung Micro SD card new image of Octropi (plus octoprint upgrade when I launched it)

WRITE HERE

I think I have solved the problem- further prints will confirm, but in any case it might help a lot of people.

My solution was to cut the red wire in the USB cable to the printer. This disconnected the 5V connection between the Robin Nano and the Raspi.

In my view, the Nano shouldn't have the 5V connected to the USB socket as it can cause problems at either end of the cable.

Depending on the internal resistance of the two 5V supplies, and their exact voltages, you could have power flowing either way down the 5V line. Indeed as the 5V demand varied at either end this could change.
This can cause big currents to flow either way down the cable.
Those big currents on the ground line will directly disturb what the pi and the printer see on the data lines, or equally at the printer end.

It could also damage or overheat power supplies.

Of course people who have changed cables or power supplies may have seen a fix to this problem, but it isn't the correct solution and more problems can be expected later.

I would strongly recommend that a data-only USB cable is ALWAYS used to connect the PI to the printer.

Yes, this can very well help in many, many cases. Other way to do this is to put a little tape on the connector's contact.
Actually if there is some flow, it can give other problems like the voltage on the printers mainboard is dropping and the voltage-stabilizer on the mainboard (mostly just a simple lineair regulator like the LM78L05) is overheating causing the printer to stall because it tries to power the Pi.

You can use another cable when updating the printer; some printers need their PSU's disconnected when updating the firmware so it needs power from the PC or PI (or other alternatives) at that time.

1 Like

By the way, when you have a display on the printer itself that communicates over the same serial-connection, you might try to disable that (disconnect) if you run into the problems that are logged here. With one of my printers the display was not co-working with the serial-connection to the PC or PI when printing in certain cases.

1 Like

Further update- the problem doesn't seem to be entirely fixed- after 3 good prints I have a serial stall again :frowning: Next step is to try @elvinhaak's suggestion and disconnect the display

Well I just tried running the Robin Nano from the Octopi without the Nano's screen attached as @elvinhaak suggested. Another fail sadly.
I have now changed everything except the Rasp-pi hardware- that did hundreds of succesful prints before.
It's looking to me like the Robin Nano just become unresponsive - so presumably a hardware or software fault on that board. Of course it prints fine from the SD card.
Looks like I have to (reluctantly) try changing the controller board to make further progress.

Can you try cooling the mainboard extra and checking the voltage for the Pi?
I have had simular problems with one of my printers untill I changed the fan on the printers mainboard and then suddenly could print prints over 20 hours instead of maybe a couple of hours. And also in my case it printed from SD-card without these problems, but it seemed to slow down when looking back on the movies after a while. So maybe the mainboard of the printer is throttling down to prevent overheating and in that process stops communicating well with the USB-port.
Hope you will solve the problem !

Got to be worth a try!

I think the main board has a problem anyway. The display started behaving wierdly and now I'm getting a thermal runaway as soon as I switch it on. I have ordered a duet clone to try instead so just waiting on that arriving!

1 Like