Octoprint with MKS Gen L

#1

Ramdomly my Octoprint connection seems to halt, it only happens while printing, in manual mode everything works fine. When this happens my printer stops printing, the nozzle remains on the same spot, the bed and nozzle remain heated and in Octoprint the printer seems as connected. I try to pause or cancel the print but nothing happens, I have to restart Octoprint in order to be able to communicate with the printer again.

I run Marlin 1.1.9 on an Ender 3, my board is a MKS Gen L, I also have the TFT28 and decided to conserve the Reprap LCD, I even managed to install an SD to the board so I can put the SD either on the TFT28 or use it with the original LCD. I can print perfectly in pronterface, from the SD of the board or even with the SD connected to the TFT. But my goal was to connect Octoprint to the printer so that I can use a webcam and remote control it.

The USB cable I use is the typical blue that comes with an Arduino, don't know if it is shielded or not, lenght 30 cms. I don't know if the problem is noise from the motors or just adjust the timeouts in Octoprint for the USB connection. My baudrate is 250000, have tried with 115200 but the issue continues to happen.

My octoprint runs in a Raspberry Pi 3 Model B Plus Rev 1.3
octopi_version: 0.16.0
python:
| pip: 19.0.1
| version: 2.7.13

I'm new to the forum and don't know how to upload the octoprint.log but the printer halted when this happened:

Send: N137178 G1 X125.596 Y96.769 E365.09249100
| Send: N137179 G1 X125.663 Y96.907 E365.09657
97
| Recv: ok
| Send: N137180 G1 X125.708 Y97.03 E365.1000594
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 137180
| Send: N137181 G1 X125.789 Y97.204 E365.10516
100
| Recv: Resend: 137181
| Recv: ok
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 137180
| Recv: Resend: 137181
| Send: N137181 G1 X125.789 Y97.204 E365.10516100
| Recv: ok
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 137180
| Send: N137181 G1 X125.789 Y97.204 E365.10516
100
| Recv: Resend: 137181
2019-05-07 20:05:19,450 - octoprint.util.comm - ERROR - Caught an exception in the send loop
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2941, in _send_loop
entry = self._send_queue.get()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 3994, in get
item, _, _ = PrependableQueue.get(self, block=block, timeout=timeout)
File "/usr/lib/python2.7/Queue.py", line 178, in get
item = self._get()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4037, in _get
item = self._resend_queue.get(block=False)
File "/usr/lib/python2.7/Queue.py", line 165, in get
raise Empty
Empty
2019-05-07 20:05:19,495 - octoprint.util.comm - INFO - Ignoring resend request for line 137182, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:20,033 - octoprint.util.comm - INFO - Ignoring resend request for line 137190 == current line, we haven't sent that yet so the printer got N-1 twice from us, probably due to a timeout
2019-05-07 20:05:20,078 - octoprint.util.comm - INFO - Ignoring resend request for line 137190, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:20,631 - octoprint.util.comm - INFO - Ignoring resend request for line 137199 == current line, we haven't sent that yet so the printer got N-1 twice from us, probably due to a timeout
2019-05-07 20:05:20,670 - octoprint.util.comm - INFO - Ignoring resend request for line 137199, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:20,732 - octoprint.util.comm - INFO - Ignoring resend request for line 137201, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:20,791 - octoprint.util.comm - INFO - Ignoring resend request for line 137203, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:20,855 - octoprint.util.comm - INFO - Ignoring resend request for line 137205, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,145 - octoprint.util.comm - INFO - Ignoring resend request for line 137212 == current line, we haven't sent that yet so the printer got N-1 twice from us, probably due to a timeout
2019-05-07 20:05:21,191 - octoprint.util.comm - INFO - Ignoring resend request for line 137212, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,241 - octoprint.util.comm - INFO - Ignoring resend request for line 137214, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,301 - octoprint.util.comm - INFO - Ignoring resend request for line 137216, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,361 - octoprint.util.comm - INFO - Ignoring resend request for line 137218, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,412 - octoprint.util.comm - INFO - Ignoring resend request for line 137220, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:21,451 - octoprint.util.comm - INFO - Ignoring resend request for line 137220, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:41,688 - octoprint.util.comm - INFO - Ignoring resend request for line 138187, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:41,707 - octoprint.util.comm - INFO - Ignoring resend request for line 138187, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:41,722 - octoprint.util.comm - INFO - Ignoring resend request for line 138187, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:46,595 - octoprint.util.comm - INFO - Ignoring resend request for line 138333, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:53,108 - octoprint.util.comm - INFO - Ignoring resend request for line 138582, that still originates from lines we sent before we got the first resend request
2019-05-07 20:05:54,160 - octoprint.util.comm - INFO - Ignoring resend request for line 138595, that still originates from lines we sent before we got the first resend request
2019-05-07 20:06:04,166 - octoprint.util.comm - INFO - Ignoring resend request for line 138911, that still originates from lines we sent before we got the first resend request
2019-05-07 20:06:13,909 - octoprint.util.comm - INFO - Ignoring resend request for line 139180, that still originates from lines we sent before we got the first resend request
2019-05-07 20:06:18,724 - octoprint.util.comm - INFO - Ignoring resend request for line 139392, that still originates from lines we sent before we got the first resend request
2019-05-07 20:14:48,194 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Cancelling"

Until I cancelled the print.

I think the problem is with the Raspberry somehow becuase when I connect the MKS to my computer the cable I use is not shielded and has 3 m of lenght. But I'm not an expert and very rookie with Raspberry.

Need help or advice please.

#2

Looks like you solved the problem. Replace the cable with an internal/metallic shielded cable or one with a ferrite core.

#3

OK, i'll buy some ferrite cores and let you know if it solved the problem. Many thanks!