Closed coliss86 closed 2 years ago
I think that an error of the kind Error:checksum mismatch
should not trigger a popup.
@i-make-robots WDYT ?
here is my log - hope it helps! makelangelo.zip
More details: on first error, Makelangelo resends the wrong line, it should resend 439 but logs says it resends 440
2022-01-26 16:42:14,286 TRACE c.m.m.p.p.MarlinInterface - sending 'N436 G1 X-19.910 Y23.662 F3000.0*125'
2022-01-26 16:42:14,286 TRACE c.m.m.p.p.MarlinInterface - sending 'N437 G1 X-20.134 Y23.899 F3000.0*114'
2022-01-26 16:42:14,286 TRACE c.m.m.p.p.MarlinInterface - sending 'N438 G1 X-20.353 Y24.186 F3000.0*126'
2022-01-26 16:42:14,292 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,292 TRACE c.m.m.p.p.MarlinInterface - sending 'N439 G1 X-20.565 Y24.518 F3000.0*127'
2022-01-26 16:42:14,293 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,293 TRACE c.m.m.p.p.MarlinInterface - sending 'N440 G1 X-20.768 Y24.892 F3000.0*113'
2022-01-26 16:42:14,332 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,332 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,333 TRACE c.m.m.p.p.MarlinInterface - sending 'N441 G1 X-21.051 Y25.517 F3000.0*125'
2022-01-26 16:42:14,334 TRACE c.m.m.p.p.MarlinInterface - sending 'N442 G1 X-21.303 Y26.207 F3000.0*127'
2022-01-26 16:42:14,344 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,344 TRACE c.m.m.p.p.MarlinInterface - sending 'N443 G1 X-21.518 Y26.946 F3000.0*124'
2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - received 'Error:checksum mismatch, Last Line: 439'
2022-01-26 16:42:14,350 ERROR c.m.m.p.p.MarlinInterface - Error from printer 'Error:checksum mismatch, Last Line: 439'
2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - received 'Resend: 440'
2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - sending 'N440 G1 X-20.768 Y24.892 F3000.0*113'
2022-01-26 16:42:14,360 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:14,360 TRACE c.m.m.p.p.MarlinInterface - sending 'N441 G1 X-21.051 Y25.517 F3000.0*125'
2022-01-26 16:42:14,371 TRACE c.m.m.p.p.MarlinInterface - received 'Error:Line Number is not Last Line Number+1, Last Line: 439'
2022-01-26 16:42:14,371 ERROR c.m.m.p.p.MarlinInterface - Error from printer 'Error:Line Number is not Last Line Number+1, Last Line: 439'
2022-01-26 16:42:28,310 TRACE c.m.m.p.p.MarlinInterface - received 'Resend: 440'
2022-01-26 16:42:28,310 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:28,310 TRACE c.m.m.p.p.MarlinInterface - sending 'N440 G1 X-20.768 Y24.892 F3000.0*113'
2022-01-26 16:42:28,311 TRACE c.m.m.p.p.MarlinInterface - received 'Error:Line Number is not Last Line Number+1, Last Line: 439'
2022-01-26 16:42:28,311 ERROR c.m.m.p.p.MarlinInterface - Error from printer 'Error:Line Number is not Last Line Number+1, Last Line: 439'
2022-01-26 16:42:29,069 TRACE c.m.m.p.p.MarlinInterface - received 'Resend: 440'
2022-01-26 16:42:29,069 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:29,069 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:29,069 TRACE c.m.m.p.p.MarlinInterface - sending 'N440 G1 X-20.768 Y24.892 F3000.0*113'
2022-01-26 16:42:29,069 TRACE c.m.m.p.p.MarlinInterface - sending 'N441 G1 X-21.051 Y25.517 F3000.0*125'
2022-01-26 16:42:29,070 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:29,070 TRACE c.m.m.p.p.MarlinInterface - sending 'N442 G1 X-21.303 Y26.207 F3000.0*127'
2022-01-26 16:42:29,071 TRACE c.m.m.p.p.MarlinInterface - sending 'N443 G1 X-21.518 Y26.946 F3000.0*124'
2022-01-26 16:42:29,114 TRACE c.m.m.p.p.MarlinInterface - received 'Error:Line Number is not Last Line Number+1, Last Line: 440'
2022-01-26 16:42:29,114 ERROR c.m.m.p.p.MarlinInterface - Error from printer 'Error:Line Number is not Last Line Number+1, Last Line: 440'
2022-01-26 16:42:29,721 TRACE c.m.m.p.p.MarlinInterface - received 'Resend: 441'
2022-01-26 16:42:29,721 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:29,721 TRACE c.m.m.p.p.MarlinInterface - received 'echo:Unknown command: "*125"'
2022-01-26 16:42:29,721 TRACE c.m.m.p.p.MarlinInterface - sending 'N441 G1 X-21.051 Y25.517 F3000.0*125'
2022-01-26 16:42:29,721 TRACE c.m.m.p.p.MarlinInterface - received 'ok'
2022-01-26 16:42:29,722 TRACE c.m.m.p.p.MarlinInterface - sending 'N442 G1 X-21.303 Y26.207 F3000.0*127'
Just tried with a usb cable, same error so not related to HC06 Bluetooth
MarlinInterface
is perfectly able to handle checksum mismatches so they are not fatal errors. It is also (nearly always) able to handle bad line number (seen in #479) without fatal error.
When did these become a popup? whatever we "fixed" by adding a popup should be re-examined.
yes, a mismatches and a resend should not be trigger a popup. I'm testing an old version of Makelangelo to find when this mismatch error starts to happen.
mismatch errors happen all the time. serial communications are unreliable. the mismatches are not new. the popup is new.
Makelangelo resends the wrong line, it should resend 439 but logs says it resends 440
the marlin tell us "Error: ..." then "Resend: ...." As the error is not fatal (!) This is the number line in the "Resend: ..." we have to resend ...
2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - received 'Error:checksum mismatch, Last Line: 439' 2022-01-26 16:42:14,350 ERROR c.m.m.p.p.MarlinInterface - Error from printer 'Error:checksum mismatch, Last Line: 439' 2022-01-26 16:42:14,350 TRACE c.m.m.p.p.MarlinInterface - received 'Resend: 440'
But as the "marlin buffer" contains "pre buffered line" (already send ) to get in track multiple "Resend: ..." will be send ( for each line buffered in the marlin ... ) until it "stabilize" ...
The "Error: checksum mismatch" is common in USB serial communication (wire interference ... it would be preferable to use a shielded and short USB cable or even avoid large welds that capture the electromagnetic wave in the assembly)
Also "ok" Marlin have better than the simple 'ok' see https://marlinfw.org/docs/configuration/configuration.html#advanced-ok and for more https://github.com/MarginallyClever/Marlin-polargraph/blob/bugfix-2.0.x/docs/Queue.md#synchronization
... so no error dialog to show as you say. ( if i'm not missing something else ...)
But while testing, I found another problem (hopping only on my linux ubuntu ): if I connect, then disconnect under Makelangelo (you must have already opened a connection once and closed it without leaving Makelangelo), then if I connect under Repetier Host (but don't disconnect), Makelangelo can connect... and it mixes up communications (like java lib issue for serial port, mishandled semaphore story...)
Also but not serious, just sad for me, Makelangelo does not know how to use a g-code file with M300s (to make "music" when you have activated the SPEAKER in marlin configuration.h ) mario.gcode.txt playable under http://ddrboxman.github.io/RepRapRingtone/
Edit : sorry multiple time edited message.
ok I'll fix it asap
But while testing, I found another problem (hopping only on my linux ubuntu ): if I connect, then disconnect under Makelangelo (you must have already opened a connection once and closed it without leaving Makelangelo), then if I connect under Repetier Host (but don't disconnect), Makelangelo can connect... and it mixes up communications (like java lib issue for serial port, mishandled semaphore story...)
Same on a mac, it is due to the serial lib https://github.com/java-native/jssc which doesn't not opened exclusively the port. Even with the flag JSSC_NO_TIOCEXCL
it does not open the port exclusively, cf https://github.com/java-native/jssc/blob/master/src/main/java/jssc/SerialPort.java#L208
Same on a mac, it is due to the serial lib https://github.com/java-native/jssc which doesn't not opened exclusively the port. Even with the flag
JSSC_NO_TIOCEXCL
it does not open the port exclusively, cf https://github.com/java-native/jssc/blob/master/src/main/java/jssc/SerialPort.java#L208
Thank you, it's not just my OS ! I'm reassured. ! :) I cross my fingers that in a next version of "jssc" the problem will be corrected... (my knowledge of "low level" operating systems is very far away...)
@PPAC37 The "last line" means "last line received OK". So the line to send is the first line that fails, which is (last ok)+1
.
Makelangelo software can send any string to a serial connection. If you want to write a mod that sends M300s, let's discuss it and figure out how.
Repetier not using exclusive is their problem. I remember long ago trying JSSC without success. If you get it working... cool. necessary? shrug I think our time would be better spent building cool new conversion styles and making the UI more intuitive.
Works like a charm! Thanks!
Steps to make the bug happen I'm trying a Bluetooth adapter HC06 connected to the robot and sometimes, the following popup appears and blocks the robot. I think this is caused by error in transmissions.![image](https://user-images.githubusercontent.com/23615562/151171618-393fb4cb-34dd-4c74-8ad2-2f0a52505b57.png)
If I click OK, the popup appears multiple times and finally the print continues.
What was supposed to happen I think the popup should not appears when the resend works.
Platform (please complete the following information):
Log file Some more logs:
Additional context Add any other context about the problem here. If applicable, add screenshots to help explain your problem.