M400 unknown M-code

What is the problem?
When a print finishes, or when I pause, I get 'Unknown Mcode' error. Appears as a UI message box, and in terminal. Doesn't matter for a print finish, but matters for a pause (means I can't run custom pause/resume scripts).

What did you already try to solve it?
Rebooted Pi. Upgraded to latest Octoprint/octopi.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
M3D Micro printer connected to Pi 3B+
(from UI) OctoPrint 1.3.10 running on OctoPi 0.16.0
(M115) Recv: ok REPETIER_PROTOCOL:2 FIRMWARE_NAME:Micro3D FIRMWARE_VERSION:2016040401 MACHINE_TYPE:The_Micro X-SERIAL_NUMBER:BK16122101050044

**From terminal, pressing pause during job:


Send: N70 G0 X103.300000 Y9.500000 Z-0.146061 E32.73402 F1000**106
Recv: ok 70
[...]
Recv: ok 71 #pressed [pause] in UI
Changing monitoring state from "Printing" to "Pausing"
Send: N72 M40018
Recv: ok Unknown M���code
Send: N73 M114
19
Recv: ok 73
[...]
Did not receive parseable position data from printer within 10.0s, continuing without it
Changing monitoring state from "Pausing" to "Paused"
[...] #pressed [cancel] in UI
Changing monitoring state from "Paused" to "Cancelling"


Thanks for helping

Disable position logging on pause and cancel in the serial settings in OctoPrint.

And then scream at your firmware vendor that their firmware is lacking fairly basic commands.

Will try that (disable, then scream). Thanks Gina.

Related, is there any octoprint plugin/setting that will allow the server to ignore specific gcode commands? I looked through the menus and advanced menus and saw nothing.

** Problem is I think I'll need position tracking to allow a 'resume' script

G0 ((pause.position(X)))

I might also suggest it to Donovan (M33 fio) as there is a section in his plugin which performs on-the-fly processing (e.g remove temp commands, remove fan commands). A key-in for 'unsupported g-codes' or such might help (me and others)

Clint

You could modify my own OctoPrint-Toggle-Autolevel plugin. This one basically looks for G29 and replaces it with ;G29. Since it's a single-file plugin, the thought would be that you could modify it, place it where it needs to be and it would then just work.

Awesome OG, I will definitely try it (and will let the thread know).

1.3.11 will include a configurable list of commands to never send to the printer. See the blog post and change log :yum:

:laugh: I almost wrote a plugin yesterday I was going to call Muffliato which would have done that.

Not wanting to sound newb, but I kind of am... I don't know how to install/enable a plug-in outside Plugins manager... doh

If someone could point me to an instructional post, I'll follow up tonight.

Gina, I tried disabling the 'log on pause' setting (whatever it's called), and I still received the error. Will try it again tonight to be sure.

I know that the m3d (firmware?) has pre and post g-code that runs regardless of any .GCO contents (and independent of Gcode scripts in octoprint settings).

Clint

Hang on for 1.3.11 then. It sounds like it's going to totally have all this in it anyway.