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

    CONSTANT AJAX disconnect errors

    Scheduled Pinned Locked Moved
    General Discussion
    28
    307
    54.6k
    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.
    • KeeganBundefined
      KeeganB
      last edited by

      @dc42:

      Keegan, I'd like to send you a Duet WiFi with external antenna to test, to see if it resolves the problem. The antenna will need to be mounted on the outside of your printer, and the cable to the wifi module on the Duet is 13cm long. Will that be workable for you? If so, please PM me with your mailing address.

      Also, do you have a 3.3V-compatible USB-to-serial converter? If so then we might be able to get some diagnostics out of the wifi module.

      David,

      I would be thrilled to test the external antenna version. 13cm should be plenty of length. I am mounting the Duet where the Rambo was in the Rostock Max, so I should have plenty of distance to run the antenna outside of the melamine frame.

      I have a USB-to-serial converter somewhere in an electronics junk drawer. I don't have a clue what the specs are for it. I know it is standard size USB on one end and I think it is 9-pin serial on the other.

      I have to ask given the unlucky circumstances with the first replacement duet I received. Is this one a new board, or a "refurbished" board? You'll understand my concern with the used boards.

      Artemis
      Rostock Max v2
      Orion

      1 Reply Last reply Reply Quote 0
      • KeeganBundefined
        KeeganB
        last edited by

        David, sorry I missed it the first time. PM with address sent.

        Artemis
        Rostock Max v2
        Orion

        1 Reply Last reply Reply Quote 0
        • cbusilloundefined
          cbusillo
          last edited by

          I'm not sure if it adds anything to this discussion, but I have an ethernet Duet. I have used different routers and switches and always had disconnects. Its the only thing about this wonderful board that is annoying. I use curl to upload from S3D and it works 100% of the time even when the web interface won't connect.

          I keep hoping new firmwares will make it better, but not yet. It seems better on some firmwares, but its hard to tell if thats just me. It seems to help to disconnect the ethernet and reconnect.

          1 Reply Last reply Reply Quote 0
          • paralepsisundefined
            paralepsis
            last edited by

            I think I'm having the same issue that is being reported here. Synopsis of my machine:

            • D-Bot, more or less

            • 24V Meanwell PS + Anker USB PS for 5V

            • Duet Wifi, 1.19.2 firmware

            • Duet enclosure is a 3d-printed, open top enclosure sitting outside the frame

            On boot, I am typically able to interact normally with the Duet for bed compensation calculation, etc., including preheating hotend and bed. However, typically after I start a print I lose connectivity to the web server, never to return until reboot. Print continues as normal, and I can continue to communicate with the board via USB.

            M122 output after last fail:

            [[language]]
            daemon is idle in state(s) 0
            queue is idle in state(s) 0
            autopause is idle in state(s) 0
            Code queue is empty.
            Network state is running
            WiFi module is connected to access point
            WiFi firmware version 1.19.2
            WiFi MAC address 5c:cf:7f:37:8f:14
            WiFi Vcc 3.12, reset reason Turned on by main processor
            WiFi flash size 4194304, free heap 37848
            WiFi IP address 192.168.1.120
            WiFi signal strength -55dBm
            Reconnections 0
            HTTP sessions: 1 of 8
            Socket states:  0 0 0 0 0 0 0 0
            Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
            
            

            The machine is still a build in progress, so it isn't killing me that this is happening, but if I can somehow contribute to resolving, I'd be happy to.

            Railcore II 300XL w/ Duet 3 & RRF 3.5rc4, Makerbot R2X w/ Duet 2 WiFi & RRF 3.4

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

              @cbusillo:

              I'm not sure if it adds anything to this discussion, but I have an ethernet Duet. I have used different routers and switches and always had disconnects. Its the only thing about this wonderful board that is annoying. I use curl to upload from S3D and it works 100% of the time even when the web interface won't connect.

              I keep hoping new firmwares will make it better, but not yet. It seems better on some firmwares, but its hard to tell if thats just me. It seems to help to disconnect the ethernet and reconnect.

              Do the disconnections happen only during printing, or at any time? If they happen only during printing, then next time you get a disconnection during a print, after the print finishes please run M122 and report the MaxReps value in the report. Note, MaxReps is cleared each time you run M122 so only the value you get the first time you run M122 after a print counts.

              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
              • KeeganBundefined
                KeeganB
                last edited by

                Last night i finally had time to setup the separate router and connect the Duet to it. Very basic setup. network with WPA2 encryption, dhcp IP, no internet access, and no other devices connected to it. Its a rather annoying way to test because I have to switch back and forth networks from my computer, but I may pull an old junk laptop out to do some extended testing.

                Artemis
                Rostock Max v2
                Orion

                1 Reply Last reply Reply Quote 0
                • Mentaluproarundefined
                  Mentaluproar
                  last edited by

                  I'm now getting AJAX errors while the unit just sits there, idle. I can power cycle the printer and it comes back online, but it goes offline again after I connect.

                  I tried resetting the router, which is literally 6 feet away from the printer. No difference.

                  1 Reply Last reply Reply Quote 0
                  • KeeganBundefined
                    KeeganB
                    last edited by

                    @Mentaluproar:

                    I'm now getting AJAX errors while the unit just sits there, idle. I can power cycle the printer and it comes back online, but it goes offline again after I connect.

                    I tried resetting the router, which is literally 6 feet away from the printer. No difference.

                    So, when you get the AJAX disconnect, you can not click "Connect" in DWC or reload the page to get back connected?

                    Can you reconnect without a power cycle by sending M552 S0 (or S-1), followed by M552 S1 via USB?

                    Artemis
                    Rostock Max v2
                    Orion

                    1 Reply Last reply Reply Quote 0
                    • patelundefined
                      patel
                      last edited by

                      M122
                      === Diagnostics ===
                      Used output buffers: 3 of 32 (6 max)
                      === Platform ===
                      RepRapFirmware for Duet WiFi version 1.19.2 running on Duet WiFi 1.0
                      Board ID: 08DDM-9FAM2-LW4SD-6J9D6-3SN6L-12ZHY
                      Static ram used: 21176
                      Dynamic ram used: 95976
                      Recycled dynamic ram: 1632
                      Stack ram used: 1304 current, 4880 maximum
                      Never used ram: 7408
                      Last reset 00:12:06 ago, cause: power up
                      Last software reset reason: User, spinning module GCodes, available RAM 3192 bytes (slot 2)
                      Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
                      Error status: 0
                      Free file entries: 10
                      SD card 0 detected, interface speed: 20.0MBytes/sec
                      SD card longest block write time: 0.0ms
                      MCU temperature: min 26.1, current 34.9, max 36.7
                      Supply voltage: min 11.4, current 12.1, max 12.5, under voltage events: 0, over voltage events: 0
                      Driver 0: standstill
                      Driver 1: standstill
                      Driver 2: standstill
                      Driver 3: standstill
                      Driver 4: standstill
                      Date/time: 2017-11-06 13:50:27
                      Slowest main loop (seconds): 0.005554; fastest: 0.000034
                      === Move ===
                      MaxReps: 8, StepErrors: 0, FreeDm: 240, MinFreeDm 239, MaxWait: 4122ms, Underruns: 0, 0
                      Scheduled moves: 4, completed moves: 4
                      Bed compensation in use: none
                      Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                      === Heat ===
                      Bed heater = 0, chamber heater = -1
                      === GCodes ===
                      Segments left: 0
                      Stack records: 1 allocated, 0 in use
                      Movement lock held by null
                      http is idle in state(s) 0
                      telnet is idle in state(s) 0
                      file is idle in state(s) 0
                      serial is idle in state(s) 0
                      aux is idle in state(s) 0
                      daemon is idle in state(s) 0
                      queue is idle in state(s) 0
                      autopause is idle in state(s) 0
                      Code queue is empty.
                      Network state is running
                      WiFi module is connected to access point
                      WiFi firmware version 1.19
                      WiFi MAC address 2c:3a:e8:0a:f1:18
                      WiFi Vcc 3.08, reset reason Turned on by main processor
                      WiFi flash size 4194304, free heap 39528
                      WiFi IP address 192.168.0.22
                      WiFi signal strength -77dBm
                      Reconnections 0
                      HTTP sessions: 1 of 8
                      Socket states: 2 0 0 0 0 0 0 0
                      Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0

                      AJAX ERROR did not connect printer to the web page

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

                        I've put a temporary build (1.20beta6) of DuetWiFiServer.bin at https://www.dropbox.com/s/u7vpp2wg4rlqs8l/DuetWiFiServer.bin?dl=1. This version uses the latest SDK from Expressiv and includes a fix for the WPA2 KRACK vulnerability. It may or may not help with reliability of the WiFi connection. I've heard that the KRACK vulnerability fix may be incompatible with some routers.

                        I am doing further work on DuetWiFiServer to make additional diagnostics available.

                        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
                        • KeeganBundefined
                          KeeganB
                          last edited by

                          David, does that build include the correction of the sleep mode?

                          Artemis
                          Rostock Max v2
                          Orion

                          1 Reply Last reply Reply Quote 0
                          • Jareryundefined
                            Jarery
                            last edited by

                            Did the "disable sleep" make it in ?

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

                              No, I didn't want to try more than one thing at a time.

                              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
                              • patelundefined
                                patel
                                last edited by

                                @dc42:

                                I've put a temporary build (1.20beta6) of DuetWiFiServer.bin at https://www.dropbox.com/s/u7vpp2wg4rlqs8l/DuetWiFiServer.bin?dl=1. This version uses the latest SDK from Expressiv and includes a fix for the WPA2 KRACK vulnerability. It may or may not help with reliability of the WiFi connection. I've heard that the KRACK vulnerability fix may be incompatible with some routers.

                                I am doing further work on DuetWiFiServer to make additional diagnostics available.

                                1:52:39 PM
                                Can't rename file or directory 0:/sys/DuetWiFiServer(1).bin to /sys/DuetWiFiServer.bin

                                File gg_PLA_OPTIMAL.gcode selected for printing
                                FIRMWARE_NAME: RepRapFirmware for Duet WiFi FIRMWARE_VERSION: 1.19.2 ELECTRONICS: Duet WiFi 1.0 FIRMWARE_DATE: 2017-09-01
                                1:52:39 PM
                                M32 gg_PLA_OPTIMAL.gcode
                                Can't rename file or directory 0:/sys/DuetWiFiServer(1).bin to /sys/DuetWiFiServer.bin

                                File gg_PLA_OPTIMAL.gcode selected for printing
                                FIRMWARE_NAME: RepRapFirmware for Duet WiFi FIRMWARE_VERSION: 1.19.2 ELECTRONICS: Duet WiFi 1.0 FIRMWARE_DATE: 2017-09-01
                                1:51:31 PM
                                M997 S1
                                Can't rename file or directory 0:/sys/DuetWiFiServer(1).bin to /sys/DuetWiFiServer.bin
                                WiFi Server Version: 1.20beta6 done i getting error for rename

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

                                  Try removing the (1) from the filename before you upload it. If that doesn't work, I suggest you go into the System Editor in DWC, rename or delete the existing DuetWiFiServer.bin, then upload again.

                                  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
                                  • patelundefined
                                    patel
                                    last edited by

                                    @dc42:

                                    Try removing the (1) from the filename before you upload it. If that doesn't work, I suggest you go into the System Editor in DWC, rename or delete the existing DuetWiFiServer.bin, then upload again.

                                    Thanks for replay I did and work let see i connect my laptop to duet wifi any error commigm after update.
                                    M122
                                    === Diagnostics ===
                                    Used output buffers: 3 of 32 (17 max)
                                    === Platform ===
                                    RepRapFirmware for Duet WiFi version 1.19.2 running on Duet WiFi 1.0
                                    Board ID: 08DDM-9FAM2-LW4SD-6J9D6-3SN6L-12ZHY
                                    Static ram used: 21176
                                    Dynamic ram used: 96072
                                    Recycled dynamic ram: 1536
                                    Stack ram used: 1304 current, 9096 maximum
                                    Never used ram: 3192
                                    Last reset 01:48:41 ago, cause: software
                                    Last software reset reason: User, spinning module GCodes, available RAM 7408 bytes (slot 4)
                                    Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
                                    Error status: 8
                                    Free file entries: 10
                                    SD card 0 detected, interface speed: 20.0MBytes/sec
                                    SD card longest block write time: 0.0ms
                                    MCU temperature: min 32.4, current 32.7, max 33.4
                                    Supply voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0, over voltage events: 0
                                    Driver 0: stalled standstill
                                    Driver 1: stalled standstill
                                    Driver 2: stalled standstill
                                    Driver 3: stalled standstill
                                    Driver 4: standstill
                                    Date/time: 2017-11-07 14:10:11
                                    Slowest main loop (seconds): 0.077148; fastest: 0.000000
                                    === Move ===
                                    MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
                                    Scheduled moves: 15, completed moves: 15
                                    Bed compensation in use: none
                                    Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                                    === Heat ===
                                    Bed heater = 0, chamber heater = -1
                                    Heater 0 is on, I-accum = 0.0
                                    Heater 1 is on, I-accum = 0.0
                                    === GCodes ===
                                    Segments left: 0
                                    Stack records: 1 allocated, 0 in use
                                    Movement lock held by null
                                    http is idle in state(s) 0
                                    telnet is idle in state(s) 0
                                    file is idle in state(s) 0
                                    serial is idle in state(s) 0
                                    aux is idle in state(s) 0
                                    daemon is idle in state(s) 0
                                    queue is idle in state(s) 0
                                    autopause is idle in state(s) 0
                                    Code queue is empty.
                                    Network state is running
                                    WiFi module is connected to access point
                                    WiFi firmware version 1.20beta6
                                    WiFi MAC address 2c:3a:e8:0a:f1:18
                                    WiFi Vcc 3.36, reset reason Turned on by main processor
                                    WiFi flash size 4194304, free heap 33368
                                    WiFi IP address 192.168.0.144
                                    WiFi signal strength -42dBm
                                    Reconnections 0
                                    HTTP sessions: 2 of 8
                                    Socket states: 2 0 0 0 0 0 0 0
                                    Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)

                                    1 Reply Last reply Reply Quote 0
                                    • patelundefined
                                      patel
                                      last edited by

                                      @patel:

                                      @dc42:

                                      Try removing the (1) from the filename before you upload it. If that doesn't work, I suggest you go into the System Editor in DWC, rename or delete the existing DuetWiFiServer.bin, then upload again.

                                      Thanks for replay I did and work let see i connect my laptop to duet wifi any error commigm after update.
                                      M122
                                      === Diagnostics ===
                                      Used output buffers: 3 of 32 (17 max)
                                      === Platform ===
                                      RepRapFirmware for Duet WiFi version 1.19.2 running on Duet WiFi 1.0
                                      Board ID: 08DDM-9FAM2-LW4SD-6J9D6-3SN6L-12ZHY
                                      Static ram used: 21176
                                      Dynamic ram used: 96072
                                      Recycled dynamic ram: 1536
                                      Stack ram used: 1304 current, 9096 maximum
                                      Never used ram: 3192
                                      Last reset 01:48:41 ago, cause: software
                                      Last software reset reason: User, spinning module GCodes, available RAM 7408 bytes (slot 4)
                                      Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
                                      Error status: 8
                                      Free file entries: 10
                                      SD card 0 detected, interface speed: 20.0MBytes/sec
                                      SD card longest block write time: 0.0ms
                                      MCU temperature: min 32.4, current 32.7, max 33.4
                                      Supply voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0, over voltage events: 0
                                      Driver 0: stalled standstill
                                      Driver 1: stalled standstill
                                      Driver 2: stalled standstill
                                      Driver 3: stalled standstill
                                      Driver 4: standstill
                                      Date/time: 2017-11-07 14:10:11
                                      Slowest main loop (seconds): 0.077148; fastest: 0.000000
                                      === Move ===
                                      MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
                                      Scheduled moves: 15, completed moves: 15
                                      Bed compensation in use: none
                                      Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                                      === Heat ===
                                      Bed heater = 0, chamber heater = -1
                                      Heater 0 is on, I-accum = 0.0
                                      Heater 1 is on, I-accum = 0.0
                                      === GCodes ===
                                      Segments left: 0
                                      Stack records: 1 allocated, 0 in use
                                      Movement lock held by null
                                      http is idle in state(s) 0
                                      telnet is idle in state(s) 0
                                      file is idle in state(s) 0
                                      serial is idle in state(s) 0
                                      aux is idle in state(s) 0
                                      daemon is idle in state(s) 0
                                      queue is idle in state(s) 0
                                      autopause is idle in state(s) 0
                                      Code queue is empty.
                                      Network state is running
                                      WiFi module is connected to access point
                                      WiFi firmware version 1.20beta6
                                      WiFi MAC address 2c:3a:e8:0a:f1:18
                                      WiFi Vcc 3.36, reset reason Turned on by main processor
                                      WiFi flash size 4194304, free heap 33368
                                      WiFi IP address 192.168.0.144
                                      WiFi signal strength -42dBm
                                      Reconnections 0
                                      HTTP sessions: 2 of 8
                                      Socket states: 2 0 0 0 0 0 0 0
                                      Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)

                                      2:21:28 PM
                                      Disconnected. AJAX error
                                      2:23:29 PM
                                      === Diagnostics ===
                                      Used output buffers: 3 of 32 (17 max)
                                      === Platform ===
                                      RepRapFirmware for Duet WiFi version 1.19.2 running on Duet WiFi 1.0
                                      Board ID: 08DDM-9FAM2-LW4SD-6J9D6-3SN6L-12ZHY
                                      Static ram used: 21176
                                      Dynamic ram used: 96072
                                      Recycled dynamic ram: 1536
                                      Stack ram used: 1304 current, 9096 maximum
                                      Never used ram: 3192
                                      Last reset 01:48:41 ago, cause: software
                                      Last software reset reason: User, spinning module GCodes, available RAM 7408 bytes (slot 4)
                                      Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
                                      Error status: 8
                                      Free file entries: 10
                                      SD card 0 detected, interface speed: 20.0MBytes/sec
                                      SD card longest block write time: 0.0ms
                                      MCU temperature: min 32.4, current 32.7, max 33.4
                                      Supply voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0, over voltage events: 0
                                      Driver 0: stalled standstill
                                      Driver 1: stalled standstill
                                      Driver 2: stalled standstill
                                      Driver 3: stalled standstill
                                      Driver 4: standstill
                                      Date/time: 2017-11-07 14:10:11
                                      Slowest main loop (seconds): 0.077148; fastest: 0.000000
                                      === Move ===
                                      MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
                                      Scheduled moves: 15, completed moves: 15
                                      Bed compensation in use: none
                                      Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                                      === Heat ===
                                      Bed heater = 0, chamber heater = -1
                                      Heater 0 is on, I-accum = 0.0
                                      Heater 1 is on, I-accum = 0.0
                                      === GCodes ===
                                      Segments left: 0
                                      Stack records: 1 allocated, 0 in use
                                      Movement lock held by null
                                      http is idle in state(s) 0
                                      telnet is idle in state(s) 0
                                      file is idle in state(s) 0
                                      serial is idle in state(s) 0
                                      aux is idle in state(s) 0
                                      daemon is idle in state(s) 0
                                      queue is idle in state(s) 0
                                      autopause is idle in state(s) 0
                                      Code queue is empty.
                                      Network state is running
                                      WiFi module is connected to access point
                                      WiFi firmware version 1.20beta6
                                      WiFi MAC address 2c:3a:e8:0a:f1:18
                                      WiFi Vcc 3.36, reset reason Turned on by main processor
                                      WiFi flash size 4194304, free heap 33368
                                      WiFi IP address 192.168.0.114
                                      WiFi signal strength -42dBm
                                      Reconnections 0
                                      HTTP sessions: 2 of 8
                                      Socket states: 2 0 0 0 0 0 0 0
                                      Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)

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

                                        Were you able to reconnect by pressing the Connect button in DWC, or not?

                                        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
                                        • patelundefined
                                          patel
                                          last edited by

                                          @dc42:

                                          Were you able to reconnect by pressing the Connect button in DWC, or not?

                                          I try both way refresh F5 and connect button
                                          Run time 20min to 30min max and get Ajax error

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

                                            Patel, a few more questions:

                                            1. Have you worked through https://duet3d.com/wiki/WiFi_disconnections_and_AJAX_timeout_errors ?

                                            2. In the AJAX error message box, is the Error Reason always given as "timeout"?

                                            3. After a disconnection occurs, are you able to ping the Duet?

                                            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
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA