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

    M122 does not work from DWC console

    Scheduled Pinned Locked Moved
    Firmware installation
    4
    13
    1.5k
    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.
    • Adrian52undefined
      Adrian52
      last edited by

      I have seen an occasional failure of M122 to give a response in the DWC g-code console. With the current firmware and DWC (2.02rc1 and 1.22.3), M122 will cause a pause, disconnect, and immediate reconnect. This usually happens when I return to the printer some time after the print has finished. I can connect with YAT, and I get a response to M122 - this is the output: 0_1536068880847_20180904m122 from yat.txt
      This output does not relate to the completed print, so presumably the M122 from DWC was processed to some extent. Interestingly, the DWC g-code console is still responsive to some commands - I can send an M999 reset for example. Have seen this with previous versions of firmware/DWC.

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

        Are you saying that after the problem occurs, most commands sent from the GCode Console don't work?

        A few commands (from memory M112 and M122, I can't remember about M999) are recognised early and bypass the normal command queue.

        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

        Adrian52undefined 1 Reply Last reply Reply Quote 0
        • Adrian52undefined
          Adrian52 @dc42
          last edited by

          @dc42 my impression is that quite a few commands do work. I will do a more comprehensive check next time it happens

          1 Reply Last reply Reply Quote 0
          • Adrian52undefined
            Adrian52
            last edited by

            I tried again today, and the output of the DWC g-code console is here:
            0_1536253098443_20180906m122 from dwc.txt
            M122 just over 1hr after the print finished did not give a response, although there was no disconnect/reconnect this time. I then tried M665, M666, head movement, homing and adjusted the hot end temperature, and listed the sd card with M20 - all seemed to work. Re trying M122 worked this time. Simply retrying M122 has not previously worked. Will check again when I get the full disconnect response to M122.

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

              Added to my list to look at.

              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

              1 Reply Last reply Reply Quote 0
              • sigxcpuundefined
                sigxcpu
                last edited by sigxcpu

                Here's a traffic capture when M122 fails on DWC (but works on serial & telnet).

                T 2018/09/08 23:46:05.963684 192.168.27.112:55398 -> 192.168.27.8:80 [AP] #47
                GET /rr_gcode?gcode=M122 HTTP/1.1.
                Host: 192.168.27.8.
                Accept-Encoding: gzip, deflate.
                Connection: keep-alive.
                Accept: application/json, text/javascript, */*; q=0.01.
                User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14.
                Referer: http://192.168.27.8/.
                Accept-Language: en-us.
                X-Requested-With: XMLHttpRequest.
                .
                
                
                T 2018/09/08 23:46:05.969594 192.168.27.8:80 -> 192.168.27.112:55398 [AP] #48
                HTTP/1.1 200 OK
                Cache-Control: no-cache, no-store, must-revalidate
                Pragma: no-cache
                Expires: 0
                Access-Control-Allow-Origin: *
                Content-Type: application/json
                Content-Length: 12
                Connection: close
                
                {"buff":255}
                
                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by

                  That response means that you have already sent some commands to be executed from DWC, that are waiting to be executed, and the input pipeline is full. So the M122 command has probably not completed. Perhaps you need to make more rr_reply calls to retrieve the M122 response.

                  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

                  1 Reply Last reply Reply Quote 0
                  • Adrian52undefined
                    Adrian52
                    last edited by

                    M122 still not working consistently from dwc using 2.02rc4/1.22.5. As before, usually works after one print, but subsequently causes no response but a brief disconnection /reconnect. M122 works from yat. Tried M122 from android app, and this also gave disconnect/reconnect response, seen simultaneously on the pc dwc.

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

                      How many clients are logged on to the Duet when you send M122? I'm wondering whether it could by running out of buffers if you have multiple web clients logged on.

                      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

                      Adrian52undefined 1 Reply Last reply Reply Quote 0
                      • Adrian52undefined
                        Adrian52 @dc42
                        last edited by

                        @dc42 I get the problem with just a windows 10 pc running Firefox connected. Incidentally, only M122 seems to be affected - I can continue printing with no obvious problems.

                        1 Reply Last reply Reply Quote 0
                        • chrishammundefined
                          chrishamm administrators
                          last edited by

                          I have never seen this for a particular code like M122. But there is a known issue that occurs when you run two or more instance of DWC on the same device/IP: In this case only one of the DWC instances will actually receive the G-code reply and the others will just print an empty/successful response. Please verify this again.

                          Duet software engineer

                          Adrian52undefined 1 Reply Last reply Reply Quote 0
                          • Adrian52undefined
                            Adrian52 @chrishamm
                            last edited by

                            @chrishamm I have uninstalled 'find my duet' from my phone, and the only instance of dwc I have running is on my win10/Firefox pc. Still get the same problem - there is a 10 second pause after sending M122, then a disconnect /reconnect. Just trying another print without rebooting the duet.

                            Adrian52undefined 1 Reply Last reply Reply Quote 0
                            • Adrian52undefined
                              Adrian52 @Adrian52
                              last edited by

                              @adrian52 Print completed fine. M122 from YAT gave this . M122 from DWC gave
                              alt text
                              The earlier two disconnects were responses to M122 before the print.

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