Teacup_Firmware icon indicating copy to clipboard operation
Teacup_Firmware copied to clipboard

No code M117

Open thomaskilian opened this issue 6 years ago • 9 comments

Is there a reason why M117 is not implemented? Cura does put them in the generated code. So why not just accept this M-code and skip the rest of the line? Shouldn't be too difficult, right? I'd do that, but I'd like to avoid diving deep into gcode_process.c and find out how it actually works (if possible). Any hint on how to implement that quickly?

thomaskilian avatar Oct 01 '18 19:10 thomaskilian

Because there is no complete support for displays in Teacup. Afaik M117 will show a message on a display. So there is acutally no reason to implement something which will do nothing.

Edit: Probably your start gcode or end gcode has some lines with M117 which could be easily removed.

Wurstnase avatar Oct 02 '18 04:10 Wurstnase

I use, probably like anyone else, Octoprint to feed my 3D printer. Once an unknown opcode (like M117) is sent, Teacup echos the remainder of the current line one char after the other. That causes Octoprint to just hang and stop further printing. So rather than that I'd wish Teacup could just reply with some well-formed warning or to skip the opcode.

P.S. No, it's not start/end. Cura is putting that in when using a post-processing macro.

thomaskilian avatar Oct 02 '18 05:10 thomaskilian

I will check how to do correct error/warning handling for Octoprint. It's not very easy to handle all different hosts. thomaskilian [email protected] schrieb am Di. 2. Okt. 2018 um 07:42:

I use, probably like anyone else, Octoprint to feed my 3D printer. Once an unknown opcode (like M117) is sent, Teacup echos the remainder of the current line one char after the other. That causes Octoprint to just hang and stop further printing. So rather than that I'd wish Teacup could just reply with some well-formed warning or to skip the opcode.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Traumflug/Teacup_Firmware/issues/305#issuecomment-426155553, or mute the thread https://github.com/notifications/unsubscribe-auth/AITlJ6eVGrAaTs6nPvZtcPmcHKGplxXHks5ugvzggaJpZM4XCugM .

Wurstnase avatar Oct 02 '18 06:10 Wurstnase

Looking into Marlin I just see "Error: \n". I'll check how Octoprint reacts on that and whether it probably accepts something like a warning. So you can save that effort here.

I'd be happy to just know how to skip until \n in the gcode_process.c.

thomaskilian avatar Oct 02 '18 06:10 thomaskilian

I'm a bit confused now. The malicious M117 is preceded by a M107 where Teacup responds with "E: Bad M-code" and Octoprint happily continuing. It's probably that 107 has no extra parameters. So, why not add a skip to newline after that?

thomaskilian avatar Oct 02 '18 09:10 thomaskilian

I don't think I've seen this before. Also, teacup does process the entire g-code before determining if it's valid. So I'm confused. Maybe some parameter field isn't recognized or the message includes something that triggers us to bail. Can you provide the exact command that causes this failure?

phord avatar Oct 03 '18 00:10 phord

Sure: M117 Printing... ch@L 1 It causes Teacup to echo chars enclosed in question marks. Can't post the result since I disassembled the Arduino at the moment.

thomaskilian avatar Oct 03 '18 07:10 thomaskilian

Fixed my board. Here's the echo from Teacup upon the above command: ?R??I??I??C??H??@??L?ok

thomaskilian avatar Oct 08 '18 13:10 thomaskilian

Uh! I think it was just because the code was compiled with DEBUG. That makes it echo unknown chars :-/

thomaskilian avatar Oct 08 '18 14:10 thomaskilian