M118 - Serial print


Send a message to the connected host for display in the host console or to perform a host action.


The E and A parameters must precede the message.


M118 [A1] [E1] [string]

Prepend // to denote a comment or action command. Hosts like OctoPrint can interpret such commands to perform special actions. See your host’s documentation.


Prepend echo: to the message. Some hosts will display echo messages differently when preceded by echo:.


Message string. If omitted, a blank line will be sent.


Echo “Yello World!” in the console

M118 E1 Yello World!

Tell OctoPrint to cancel the print job

M118 A1 action:cancel