Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    M118: Send Message to Specific Target

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    7
    279
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • arhiundefined
      arhi
      last edited by

      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.

      A Former User? 1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User @arhi
        last edited by

        @arhi said in M118: Send Message to Specific Target:

        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.

        1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi
          last edited by

          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 )

          A Former User? 1 Reply Last reply Reply Quote 0
          • A Former User?
            A Former User @arhi
            last edited by

            @arhi said in M118: Send Message to Specific Target:

            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.

            1 Reply Last reply Reply Quote 0
            • arhiundefined
              arhi
              last edited by

              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 Error: .* format 🙂

              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".

              dc42undefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @arhi
                last edited by

                @arhi said in M118: Send Message to Specific Target:

                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.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                arhiundefined 1 Reply Last reply Reply Quote 0
                • arhiundefined
                  arhi @dc42
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA