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

    Duet Wifi Webserver not responding

    Scheduled Pinned Locked Moved
    General Discussion
    13
    80
    10.4k
    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.
    • Nuvagundefined
      Nuvag
      last edited by

      Will try this the next time.

      Until then maybe this helps:
      I had the debug enabled when loosing the connection in the web interface ('Communication Error'):

      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 1 for local port 80
      Found responder
      Received 411 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 3 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 3 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 4 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 5 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 3 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 4 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 5 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 3 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 5 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 5 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 6 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 5 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 7 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 2 for local port 80
      Found responder
      Received 475 bytes
      New conn on socket 6 for local port 80
      Found responder
      Received 475 bytes
      Class Network spinning
      Class Network spinning
      Class Network spinning
      Class Network spinning
      
      

      For a very long time it uses socket 0 (not included in the log above), than for a long time using socket 1 and finally in quick succession other sockets. Additionally the number of bytes increase from 411 to 475.
      As reloading the webinterface got it connected again, i could not try your instructions. (now its using socket 6 and size is back to 411 bytes)

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

        If pressing the Connect button doesn't work but reloading the web interface does, that suggests the browser tab may have locked up, probably because of an unhandled exception. If the Connect button is completely unresponsive, try pressing control-shift-J to open the debugging console, and see whether any Javascript exceptions have been reported.

        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
        • Nuvagundefined
          Nuvag
          last edited by

          Sorry for the confusing order of my reports, as the problems aren't reproducable at will it have tom report them as they appear.

          Just now i had again the problem of not fully loading web interface.
          Restarting HTTP did not work and produced no additional messages.

          Here are the different errors i got from the developer tools in my browser when repeatedly loading the page: (Sorry for the german message text)

          Error: Invalid dimensions for plot, width = 1647, height = 0
          dwc.js:3:35051
          
          HTTP404: NICHT GEFUNDEN: Der Server hat keine Übereinstimmungen für den angeforderten URI (Uniform Resource Identifier) gefunden.
          (XHR)GET - http://192.168.178.15/rr_download?name=0:/sys/oem.json
          
          Laden fehlgeschlagen für das 
          
          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            Thanks, I'll ask chrishamm to take a look (he wrote DWC and is German himself).

            The "oem.json not found" is normal, that's an optional file.

            The "could not load the script" is odd. Are any further details given about the nature of that error?

            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
            • Nuvagundefined
              Nuvag
              last edited by

              No, got no further details. But it noticed sometimes it takes >30 seconds to load http://192.168.178.15/js/dwc.js in an own browser tab, so i suspect its a timeout. After restarting wifi the loadtime is consistantly around 1 second.
              This javascript is very large, above 1MB (300 KB zipped) and not cached in the browser. This could probably be optimized, but should not be the root cause. But if memory is in short supply and the gzip version is created on the fly this could be a problem(?)

              webinterface just lost connection again, this time if found an "Unexpected state change on socket X":

              New conn on socket 6 for local port 80
              Found responder
              Received 488 bytes
              New conn on socket 7 for local port 80
              Found responder
              Received 475 bytes
              Client disconnected on socket 6
              New conn on socket 6 for local port 80
              Found responder
              Received 475 bytes
              New conn on socket 7 for local port 80
              Found responder
              Received 488 bytes
              New conn on socket 6 for local port 80
              Found responder
              Received 475 bytes
              Unexpected state change on socket 7
              New conn on socket 7 for local port 80
              Found responder
              Received 488 bytes
              New conn on socket 6 for local port 80
              Found responder
              Received 475 bytes
              Unexpected state change on socket 7
              New conn on socket 7 for local port 80
              Found responder
              Received 488 bytes
              New conn on socket 6 for local port 80
              Found responder
              Received 488 bytes
              Unexpected state change on socket 7
              
              
              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators
                last edited by

                What make and model is your router?

                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
                • parovoZZundefined
                  parovoZZ
                  last edited by

                  Hi!

                  Same problem. Try connect … connect ... connect ... F5 ... nothing.

                  I connect via USB. I make Disable Wi-Fi / Enable Wi-Fi. After that it works 1 hour ... 2 ... 3 hours ... Ping is always stable (2-100 ms).

                  1.20 firmware.

                  1 Reply Last reply Reply Quote 0
                  • Nuvagundefined
                    Nuvag
                    last edited by

                    I'm using a Fritz!Box 7490.

                    Just now lost connection again (webinterface won't load at all, but ping is successful) and tried your instruction but with no usefull output during deactivating/activating http and couldn't connect after that.

                    >>> M552
                    SENDING:M552
                    WiFi module is connected to access point ewl-internet.ch_40357, IP address 192.168.178.15
                    >>> M586 P0 S0
                    SENDING:M586 P0 S0
                    HTTP is disabled
                    >>> M586 P0 S1
                    SENDING:M586 P0 S1
                    HTTP is enabled on port 80
                    
                    

                    I tried rebooting the Fritz!Box and duet wifi will timeout while trying to reconnect (as booting the router takes about a minute). I reactivated wifi with M552 S1 but webinterface will still not load. Diable/Enable HTTP did again not help. (ping does work)
                    Disabling and reenabling Wifi (M552 S0 M552 S1) did bring the webinterface back.
                    So M552 S0 seems to "unblock" the webinterface.

                    Did not yet update the webserver to 1.21, will do next.

                    1 Reply Last reply Reply Quote 0
                    • Nuvagundefined
                      Nuvag
                      last edited by

                      Tonight i printed a model and closed the webinterface windwo in the brower.
                      This morning i couldn't connect to the webinterface (but ping still ok), so its probably not the polling from the webinterface thats causing the issue.
                      The log only contains about a hundret entries "Class Network spinning", no error messages.

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

                        When you are unable to connect but able to ping, if you run M552 without parameters, does it report that the Duet is connected to your network, 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
                        • Nuvagundefined
                          Nuvag
                          last edited by

                          Yes, i actually included that part in my last message because i thought you would ask that 🙂

                          >>> M552
                          SENDING:M552
                          WiFi module is connected to access point ewl-internet.ch_40357, IP address 192.168.178.15
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • Nuvagundefined
                            Nuvag
                            last edited by

                            Updated Webserver to 1.21.RC1 and immediatly having an instable connection, debug log:

                            WiFi: fGLUE: fragmented pbuf (932!=1514)!
                            WiFi: GLUE: fragmented pbuf (932!=1514)!
                            WiFi: GLUE: fragmented pbuf (932!=1514)!
                            WiFi: GLUE: fragmented pbuf (932!=1514)!
                            [...]
                            
                            

                            When reloading the page:

                            Unexpected state change on socket 0
                            Can't send anymore
                            New conn on socket 0 for local port 80
                            HTTP connection accepted
                            Found responder
                            New conn on socket 5 for local port 80
                            HTTP connection accepted
                            Found responder
                            Received 330 bytes
                            Sending reply, file = yes
                            HTTP req, command words { GET / HTTP/1.1 }, parameters { }
                            Received 339 bytes
                            Sending reply, file = yes
                            HTTP req, command words { GET /css/dwc.css HTTP/1.1 }, parameters { }
                            New conn on socket 0 for local port 80
                            HTTP connection accepted
                            Found responder
                            Received 357 bytes
                            Sending reply, file = yes
                            HTTP req, command words { GET /js/dwc.js HTTP/1.1 }, parameters { }
                            WiFi: GLUE: fragmented pbuf (788!=1514)!
                            [...]
                            
                            

                            Still having the same issue with http://192.168.178.15/js/dwc.js

                            When the connection is stable there are no messages with 'WiFi: GLUE: fragmented pbuf <…>', so this might be the cause of the problem.

                            Edit:
                            Additionally there is a problem with the html in line 1708:

                            should be

                            1 Reply Last reply Reply Quote 0
                            • Nuvagundefined
                              Nuvag
                              last edited by

                              Webinterface was online 6 hours without a problem then failed again.
                              I used Wireshark to capture the network traffic, maybe this can help fpr further analysis.

                              This happened in the moment the connection was lost:
                              https://www.dropbox.com/sh/r9zkw9id482i9z0/AAA-x0NTtIISPxijZnqTiZj0a/Wireshark_DuetWifi.PNG?dl=0
                              This was from Microsoft Edge Browser. So my PC sent an reset and from then on all requests to the duet wifi return a reset. This continues until the ajax retry limit is reached (i set it to 50 retries).
                              I found other occurences earlier where my PC closed the connection but a new one could be established without problems.

                              Then tried to open the webinterface in a different browser (Firefox) and got:
                              https://www.dropbox.com/sh/r9zkw9id482i9z0/AADPnonPL1ApvNZzF8qBnV-Va/Wireshark_DuetWifi_2.PNG?dl=0

                              I suspect for some reason all available sockets from the wifi module in the duet to the internal modules get blocked and won't be unblocked until restarting the wifi. This would explain why the wifi connection works in general (can ping and open tcp connection) but it fails when trying to get the status report.

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

                                Thanks, I suspected that these problems might be caused by a lack of sockets. Which version of DuetWiFiServer are you using?

                                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
                                • Nuvagundefined
                                  Nuvag
                                  last edited by

                                  Firmware Name:
                                  RepRapFirmware for Duet WiFi
                                  Firmware Electronics:
                                  Duet WiFi 1.0
                                  Firmware Version:
                                  1.20 (2017-12-23)
                                  WiFi Server Version:
                                  1.21RC1
                                  Web Interface Version:
                                  1.20

                                  1 Reply Last reply Reply Quote 0
                                  • parovoZZundefined
                                    parovoZZ
                                    last edited by

                                    Hi!

                                    Is it possible to make a program reset of the Wi-Fi module on an external button? For example, execute a script:

                                    M552 S-1;

                                    M552 S1;

                                    ?

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

                                      Yes, if you set up a trigger using M581.

                                      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
                                      • T3P3Tonyundefined
                                        T3P3Tony administrators
                                        last edited by

                                        if you do that I think you will need a pause in between the M552 S-1 and M552 S1 commands (I tried to make a macro for this but the S1 was executed too soon after the disable (while the wifi was still changing state) so it did not work.

                                        www.duet3d.com

                                        1 Reply Last reply Reply Quote 0
                                        • parovoZZundefined
                                          parovoZZ
                                          last edited by

                                          And then what to do?
                                          Now I connect a USB cable during printing…...brrrrrr))))

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

                                            You can insert a pause between the two M552 commands using G4.

                                            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