Lets have a look on this sequence from the octoprint.log:
2022-12-18 20:07:26,162 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 145443, current line = 145462
| Last lines in terminal:
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145456 G0 X108.689 Y83.924*37
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145457 G1 F2400 E3471.67868*3
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145458 G0 F12000 X108.248 Y83.924*119
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145459 G1 F1500 X102.762 Y78.437 E3471.85933*50
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145460 G0 F12000 X102.762 Y79.003*114
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145461 G1 F1500 X108.248 Y84.49 E3472.03998*12
| Recv: Error:checksum mismatch, Last Line: 145442
| Recv: Resend: 145443
2022-12-18 20:07:26,209 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 145443, current line = 145462
| Last lines in terminal:
| Recv: echo:Unknown command: ""
| Send: N145450 G1 F1500 X108.248 Y83.358 E3471.66453*48
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Send: N145451 G0 F12000 X108.248 Y82.793*125
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Send: N145452 G1 F1500 X107.818 Y82.363 E3471.67868*62
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145453 G1 F2400 E3466.67868*1
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 145442
| Recv: Resend: 145443
2022-12-18 20:07:26,249 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 145443, current line = 145462
| Last lines in terminal:
| Send: N145444 G1 F1500 X106.838 Y80.817 E3471.36334*54
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145445 G0 F12000 X106.838 Y81.383*125
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145446 G1 F1500 X102.762 Y77.306 E3471.49756*59
| Recv: echo:Unknown command: ""
| Recv: ok
| Recv: echo:Unknown command: ""
| Recv: ok
| Send: N145447 G0 F12000 X102.762 Y77.872*119
| Recv: Error:checksum mismatch, Last Line: 145442
| Recv: Resend: 145443
2022-12-18 20:07:26,262 - octoprint.util.comm - INFO - Ignoring resend request for line 145443, that still originates from lines we sent before we got the first resend request
2022-12-18 20:07:26,272 - octoprint.util.comm - INFO - Ignoring resend request for line 145443, that still originates from lines we sent before we got the first resend request
OctoPrint send it's lines: 145456, 145457, ... 145460.
All lines are ok.
And suddenly the firmware requests a line from the "past": 145443.
Obviously OctoPrint resent that line because the next section Last lines in terminal
starts with line 145450.
After this then again (Line 145444)
Keep in mind, that the ok
does not include a syntax check of the received line. It's the ok for the next line: G-code - RepRap
At a certain point this happens:
2022-12-18 20:07:26,262 - octoprint.util.comm - INFO - Ignoring resend request for line 145443, that still originates from lines we sent before we got the first resend request
OctoPrint shows it's good will and resends 145443 and gets a resend request for exactly that line at once:
2022-12-18 20:07:26,331 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 145443, current line = 145462
| Last lines in terminal:
| Recv: ok
| Send: N145458 G0 F12000 X108.248 Y83.924*119
| Recv: ok
| Recv: ok
| Send: N145459 G1 F1500 X102.762 Y78.437 E3471.85933*50
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 145442
| Recv: Resend: 145443
| Recv: ok
| Recv: echo:Unknown command: "02.762 Y79.003"
| Send: N145460 G0 F12000 X102.762 Y79.003*114
| Recv: ok
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 145442
| Recv: Resend: 145443
| Send: N145461 G1 F1500 X108.248 Y84.49 E3472.03998*12
| Recv: ok
| Recv: echo:Unknown command: "38 Y80.817 E3471.36334"
| Send: N145443 G0 F12000 X102.762 Y76.74*76
| Recv: ok
| Recv: Error:Line Number is not Last Line Number+1, Last Line: 145442
| Recv: Resend: 145443
2022-12-18 20:07:26,342 - octoprint.util.comm - INFO - Ignoring resend request for line 145443, that still originates from lines we sent before we got the first resend request
BTW: a regular serial.log would quite handy in this case