M118: Send Message to Specific Target
I did some tests and I seem to understand how M118 works but I want to ask if there are some things that I maybe missed.
The idea is I attach SBC on USB so on SBC I see duet2eth with RRF3 as serial device. I don't send anything to the serial port and I don't expect anything to arrive from the serial port except if someone somewhere executes M118P1S"message" and what I'll receive trough the serial port will be that message. If I send something I will get response according to what I send but if I just keep quiet and listen I can get messages, sent only to me via M118P1S"message".
That is how I understood / tested it.
- Did I miss something?
- Is there anything else that might arrive on serial port? (so far I see nothing)
- Is there a way to "subscribe" to some type of messages (e.g. "send me a message when print from SD finishes" or "lemme know when temp changes to this") or the only way to know the state of the printer is to pool it?
Thanks in advance!
p.s. the idea is to make a combo of my gcodestat preprocessor and a new plugin for Octoprint to send more data to Octoprint so stuff like "turn everything off after print" and "timelapse" work with Duet2Eth.
bearer last edited by
Is there anything else that might arrive on serial port? (so far I see nothing)
you may want to test M117 and M300 and see if it gives you any output.
I tried M117 immediately, and nothing is sent to TELNET client so I assume nothing is sent to USB client. M118P0 (or without P) will do send but M118 I can handle.
M300 is a beep? Did not try that one, but did just now after I read your message and nothing is sent to Telnet client, but nothing happened on the paneldue nor I heard any sound from the duet2eth board ( M300 S300 P1000 )
bearer last edited by
M300 is a beep?
it is, but transmitted from the duet as a json string to be interped by the paneldue (or esp8266 in my case), just didn't remember what dc42 settled on with respect to which interfaces the message would go out on.
My panel did not beep or show any message. Neither did anything show on telnet client.
I did find now a message I did not expect, I was testing curl to delete a file and upload a file and I sent file name packed wrong and on my telnet I saw:
Error: Failed to delete file 0:/gcodes/\
so, looks like general errors are sent to all "receivers" too. I hope they are all in the same
I decided just to simply prefix all my messages with
MESSAGE:and I will ignore everything else that comes from the port. That should work ok, only the original idea to use Octoprint plugin looks less and less smart and custom app seems smarter, if only I had time to maintain that and make it "proper".
so, looks like general errors are sent to all "receivers" too
Most general errors are sent to the GCode channel that sent the command that provoked the error, if that channel is capable of receiving responses. Errors provoked by the SD card, trigger and daemon (in RRF 3.01RC3) channels are sent to all GCode channels. A few specific types of error are always sent to all channels too.
@dc42 Thanks. I went with the "prefix" option, I think that's the best way to handle my particular user case, so I can easily ignore everything that comes in without the prefix.