Error:Line Number is not Last Line Number+1, Last Line:


#1

What is the problem?
start print
randomly, the printer just stops, in the communication log the following appears:

2018-05-20 18:23:24,029 - Send: N26 G1 X53.073 Y-0.330 E0.0013 F180020
2018-05-20 18:23:24,033 - Recv: ok
2018-05-20 18:23:24,037 - Send: N27 G1 X53.073 Y0.330 E0.0189
85
2018-05-20 18:23:24,041 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
2018-05-20 18:23:24,045 - Send: N28 G1 X53.071 Y0.380 E0.020283
2018-05-20 18:23:24,060 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
2018-05-20 18:23:24,075 - Send: N29 G1 X52.044 Y10.477 E0.2903
99
2018-05-20 18:23:24,077 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
2018-05-20 18:23:24,093 - Send: N30 G1 X52.036 Y10.527 E0.2916110
2018-05-20 18:23:24,094 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
2018-05-20 18:23:24,108 - Send: N31 G1 X51.904 Y11.173 E0.3092
100
2018-05-20 18:23:24,113 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
2018-05-20 18:23:24,129 - Send: N32 G1 X51.891 Y11.222 E0.310598
2018-05-20 18:23:24,132 - Recv: X:53.07 Y:-0.38 Z:0.200 E:0.0000
2018-05-20 18:23:24,140 - Recv: ok
2018-05-20 18:23:24,144 - Recv: ok
2018-05-20 18:23:24,149 - Send: N33 G1 X48.853 Y20.906 E0.5806
102
2018-05-20 18:23:24,150 - Recv: Error:Line Number is not Last Line Number+1, Last Line: 26
2018-05-20 18:23:24,152 - Send: N34 G1 X48.835 Y20.954 E0.5819104
2018-05-20 18:23:24,154 - Recv: Resend:27
2018-05-20 18:23:24,160 - Send: N27 G1 X53.073 Y0.330 E0.0189
85
2018-05-20 18:23:24,161 - Recv: ok
2018-05-20 18:23:24,163 - Send: N28 G1 X53.071 Y0.380 E0.020283
2018-05-20 18:23:24,164 - Recv: Echo:Unknown command: "dity:45.53.073 Y0.330 E0.0189"
2018-05-20 18:23:24,167 - Recv: ok
2018-05-20 18:23:24,169 - Send: N29 G1 X52.044 Y10.477 E0.2903
99
2018-05-20 18:23:24,170 - Recv: Error:Line Number is not Last Line Number+1, Last Line: 26
2018-05-20 18:23:24,172 - Recv: Resend:27
2018-05-20 18:23:24,176 - Recv: ok
``

Version of OctoPrint

OctoPrint 1.3.8 running on OctoPi 0.14.0

Operating System running OctoPrint

Raspberry

Printer model & used firmware incl. version

Kossel XL, firmware Mk4duo 3.4.6
serial.log (158.1 KB)


#2

Sounds like this issue.

Duplicate of #2285 and in fact caused by a bug in the Prusa fork of Marlin as reported by me in prusa3d/Prusa-Firmware#331

And judging by the flood of comments on #2285, that appears to not be the only problem that the current versions of Prusa's firmware seems to have sadly.

As mentioned in my firmware ticket, this:

Note: There does exist a workaround in OctoPrint for this (since it's happened in the past with other firmware variants), users can tell OctoPrint to "simulate" an ok after resends by enabling Settings > Serial communication > Advanced options > Simulate an additional ok for resend requests, but that has to be done manually.

should work, but it's tricky to test.

You might try that workaround in Settings > Serial > Advanced > Simulate...


#3

Actually, this:

2018-05-20 18:23:24,113 - Recv: ok T:192.89 /195 B:62.15 /60 B@:0 @:85 DHT Temp:20.60, Humidity:45.10
[...]
2018-05-20 18:23:24,164 - Recv: Echo:Unknown command: "dity:45.53.073 Y0.330 E0.0189"

makes me think there's a buffer overflow on the receivable buffer on the host's side in play here, due to that ridiculously long temperature report line. Issues like these already have a ticket here but right now there's no way to solve this yet other than adjusting the firmware so it doesn't overwhelm the host (btw, OctoPrint jumps through a ton of hoops to avoid overwhelming the firmware for exactly the same reasons, just with the roles reversed).


#4

Thanks for reply, I think the problem is different, because my printer, during the occurrence of these errors, tends to stop and sob, as if waiting for instructions from octoprint. I use a Radds (with arduino 2) and Raspberry Pi 2 Model B. is possible that the extrem velocity of print cause this problem?


#5

When OctoPrint can't send your printer new instructions because either a) that fails due to communication issues or b) the responses that signal it to send more are garbled then yeah, stuff gets stuck. That can be caused by trying to force too much stuff through the line, but usually it's more a case of noise on the line due to bad shielding or bad power. Or a controller that is simply overwhelmed with stuff and can't properly react to serial interrupts any more (e.g. Prusa Firmware 3.1.0 with Linear Advance).


#6
2018-06-20 07:57:35,037 - Send: N88636 G1 X3.062 Y-14.465 E2.4194*67
2018-06-20 07:57:35,038 - Recv:  T:199.38 /200 B:59.80 /60 B@:255 @:154 DHT Temp:24.10, Humidity:45.60
2018-06-20 07:57:35,078 - Recv: ok
2018-06-20 07:57:35,082 - Send: N88637 G1 X4.590 Y-14.609 E2.4758*67
2018-06-20 07:57:35,084 - Recv: ok
2018-06-20 07:57:35,087 - Recv: ok
2018-06-20 07:57:35,090 - Send: N88638 G1 X6.118 Y-14.710 E2.5320*73
2018-06-20 07:57:35,093 - Send: N88639 G1 X7.648 Y-14.766 E2.5882*73
2018-06-20 07:57:35,095 - Recv: Error:checksum mismatch, Last Line: 88635
2018-06-20 07:57:35,097 - Recv: Resend:88636
2018-06-20 07:57:35,103 - Recv: ok
2018-06-20 07:57:35,105 - Send: N88636 G1 X3.062 Y-14.465 E2.4194*67
2018-06-20 07:57:35,107 - Recv: Error:Line Number is not Last Line Number+1, Last Line: 88635
2018-06-20 07:57:35,110 - Recv: Resend:88636
2018-06-20 07:57:35,113 - Recv: ok
2018-06-20 07:57:35,116 - Send: N88637 G1 X4.590 Y-14.609 E2.4758*67
2018-06-20 07:57:35,117 - Recv: Error:Line Number is not Last Line Number+1, Last Line: 88635
2018-06-20 07:57:35,120 - Recv: Resend:88636
2018-06-20 07:57:35,125 - Recv: ok
2018-06-20 07:57:35,127 - Recv: ok
2018-06-20 07:57:35,129 - Send: N88638 G1 X6.118 Y-14.710 E2.5320*73

#7

Fortunately, I'm near a Fry's Electronics store so I can just drive there and buy things like a ferrite core. By adding one to your serial cable, it can block high-frequency interference so that it isn't induced into the serial communications.

ferrite

Stepper motors (especially the inexpensive variety) operate using square waves and these are brutal with respect to induced noise. At maybe $3, it's a cheap means of troubleshooting and possibly fixing this.