M118 - Serial print

Description

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

Notes

The E and A parameters must precede the message.

Parameters

M118 [A1] [E1] [string]
[A1]

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

[E1]

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

[string]

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

Examples

Echo “Yello World!” in the console

M118 E1 Yello World!

Tell OctoPrint to cancel the print job

M118 A1 action:cancel