M122 does not work from DWC console

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

  • administrators

    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.

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

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

  • administrators

    Added to my list to look at.

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

    T 2018/09/08 23:46:05.963684 -> [AP] #47
    GET /rr_gcode?gcode=M122 HTTP/1.1.
    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.
    Accept-Language: en-us.
    X-Requested-With: XMLHttpRequest.
    T 2018/09/08 23:46:05.969594 -> [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

  • administrators

    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.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.