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

Getting WiFi to connect

Scheduled Pinned Locked Moved
Duet Hardware and wiring
6
20
3.2k
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.
  • undefined
    peridot
    last edited by 11 Sept 2016, 11:31

    Sorry that this is in this part of the forum but there wasn't anywhere else obvious to post problems setting up the WiFi for the first time.

    I have wired up everything, correctly as far as I know, started up pronterface, and plugged in the USB cable. Lights light up, the endstop LEDs do the right thing, and pronterface connects to the printer. M503 reports a whole lot of things. So I try starting up the WiFi interface, and it appears to work:

    M552 S1
    SENDING:M552 S1
    WiFi server starting up
    DuetWiFiServer version 1.02
    Flash size 4194304, free RAM 27088 bytes, WiFi Vcc 3.38V, host name: duetwifi187, reset reason: Turned on by main processor
    WiFi is running as an access point with name DuetWiFi

    So I ask my laptop to switch to the DuetWiFi network and load 192.168.1.1. The results at this point vary. Sometimes no response, sometimes a broken part of the web page loads (listing only some of the APs I can see, and not providing the text entry boxes), but once in a while the whole thing will load. Those times I quickly type in my password and desired machine name and hit "save and reboot"; I inevitably receive "network connectivity lost", which might be okay, but the Duet WiFi network soon reappears.

    In the pronterface window (where I haven't changed anything) at some point the following additional lines appear:

    DuetWiFiServer version 1.02
    Flash size 4194304, free RAM 27352 bytes, WiFi Vcc 3.37V, host name: duetwifi187, reset reason: Exception
    WiFi is running as an access point with name DuetWiFi
    DuetWiFiServer version 1.02
    Flash size 4194304, free RAM 27152 bytes, WiFi Vcc 3.38V, host name: duetwifi187, reset reason: Exception
    WiFi is running as an access point with name DuetWiFi
    DuetWiFiServer version 1.02
    Flash size 4194304, free RAM 27312 bytes, WiFi Vcc 3.37V, host name: duetwifi187, reset reason: Exception
    WiFi is running as an access point with name DuetWiFi

    So something is wonky with the WiFi setup process, hopefully not the whole WiFi connection. Can I edit files on the SD card to get past this step? Or send seup G-code through pronterface? The web page I've been following, [[url]https://duet3d.com/wiki/Getting_connected], gives no indication that anything might ever go wrong with this process.

    Thanks,
    Anne

    1 Reply Last reply Reply Quote 0
    • undefined
      peridot
      last edited by 11 Sept 2016, 11:40

      Update: after repeating the process a couple more times I finally managed to get the connection to stay up long enough to get an "All set! Reboot me please." message.

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 11 Sept 2016, 16:26

        The Exception bit concerns me. I have never seen that.

        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
        • undefined
          peridot
          last edited by 11 Sept 2016, 16:29

          The web interface is mostly working now; I uploaded the new firmware. I do get occasional apparently random AJAX disconnections. I'm willing to do some detective work, if there's a way to track down what might be wrong.

          1 Reply Last reply Reply Quote 0
          • undefined
            T3P3Tony administrators
            last edited by 11 Sept 2016, 16:50

            Hey Anne

            If you are able to dig into what's happening on your network when the Ajax disconnects happens that would be helpful. A program like wireshark can give you a trace of what's happening. Its interesting to see if the network connection is dropping completely or if it's just the session in the browser.

            www.duet3d.com

            1 Reply Last reply Reply Quote 0
            • undefined
              Hey_Allen
              last edited by 10 Feb 2016, 06:39 2 Oct 2016, 06:38

              I don't know if I should create a new thread, If so, please feel free to split this off.

              I'm trying to get my DuetWiFi online, and am getting the same "Reset reason: Exception" errors, though only one at a time.

              This is a bare board and PanelDue being bench tested with no steppers or external power other than microUSB to the computer.
              When I turn on the WiFi server, it comes online, with the same string as shown above.

              Flash size 4194304, free RAM 27088 bytes, WiFi Vcc 3.38V, host name: duetwifi177, reset reason: Turned on by main processor

              After a few seconds to a minute, it resets, with the error string:

              Flash size 4194304, free RAM 27088 bytes, WiFi Vcc 3.38V, host name: duetwifi177, reset reason: Exception

              As to connecting to it to configure it, I have never gotten beyond the initial selection screen, as it reliably goes down within 10 seconds of being able to connect to the wifi server.

              I have tried power cycling the Duet, removed the SD card and updated the WiFi server firmware, and updated the DuetWIFI system firmware. None have changed the behavior.

              I will say that the neighborhood is very busy in the 2.4 and 5 spectrums, with over 30 different access points visible from my laptop when I have been doing this. Is this a likely cause for this behavior?

              1 Reply Last reply Reply Quote 0
              • undefined
                Hey_Allen
                last edited by 10 Feb 2016, 08:00 2 Oct 2016, 07:58

                Well, It may be a moot point now, but I'll have to see what happens once it's in actual use in the printer.

                I was finally able to get it to fully connect to the network by using two different tabs in the browser, one carefully prepared with the network selected and passphrase entered during the web server resets of the 4 or so prior rounds.
                Once the server came up and I was able to load the page in the second window, I hit the submit button in the first and it finally gave the message that it was rebooting.

                I do not know what caused all the resetting, but toward the end it appeared to be induced ~5 seconds after loading the selection page.
                I'm not positive that it correlates to the page load, nor near curious enough to reset it and try my luck again, barring a request for some log file only available by doing such.

                All that said, it looks good now, and the web interface is quick and responsive. Now to get it into operation!

                1 Reply Last reply Reply Quote 0
                • undefined
                  dc42 administrators
                  last edited by 2 Oct 2016, 08:22

                  I'm glad you got it working. I took a look at the code for getting the station list (I didn't write it), and there is some sloppy coding both there and in the underlying library that needs to be fixed, along with an unnecessary copying of station info that will impact on available memory when there are many stations. I'll add it to the list of things that need to be fixed in the ESP code. However, before that gets done I'll probably have added the facility to specify the SSID and pass phrase in a file on the SD card.

                  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
                  • undefined
                    Matthew B
                    last edited by 3 May 2017, 12:12

                    I'm having the same problem, but the web interface page will not load at all.
                    I am using the most up to date/stable versions of all firmware.

                    This is what I get from pronterface:

                    SENDING:M552 S1
                    WiFi server starting up
                    DuetWiFiServer version 1.03 (ch fork)
                    Flash size 4194304, free RAM 32840 bytes, WiFi Vcc 3.11V, host name: duetwifi, reset reason: Turned on by main processor
                    WiFi server connected to access point P-WIFI, IP=10.236.85.189, signal strength=-58dBm
                    DuetWiFiServer version 1.03 (ch fork)
                    Flash size 4194304, free RAM 32840 bytes, WiFi Vcc 3.12V, host name: duetwifi, reset reason: Exception
                    WiFi server connected to access point P-WIFI, IP=10.236.85.189, signal strength=-58dBm
                    DuetWiFiServer version 1.03 (ch fork)

                    It seems like the exception happens a few seconds after requesting a connection.

                    Any help would be appreciated.

                    Matthew

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators
                      last edited by 3 May 2017, 20:23

                      I will have new beta firmware very soon, with rewritten WiFi code. I hope that will fix it. Look out for the announcement of firmware 1.19 in beta.

                      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
                      • undefined
                        Matthew B
                        last edited by 5 Oct 2017, 08:22 10 May 2017, 08:21

                        Thank you David for the update, I have got it to work using my iphone as a hotspot, but can not connect it to my works infrastructure (no pages load although I get server response code 200), although the I.T dept. say there are no restrictions in place, I guess they are missing something.
                        Occasionally I still get disconnections and board resets, here is what M122 outputs:

                        SENDING:M122
                        === Diagnostics ===
                        Used output buffers: 1 of 32 (2 max)
                        === Platform ===
                        Static ram used: 28556
                        Dynamic ram used: 79644
                        Recycled dynamic ram: 2392
                        Stack ram used: 3680 current, 4504 maximum
                        Never used ram: 15976
                        Last reset 00:00:12 ago, cause: power up
                        Last software reset code 0x0031, HFSR 0x40000000, CFSR 0x00008200, ICSR 0x0440f803, BFAR 0x447a0000, SP 0x2001fe5c
                        Stack: 0041a479 0041db7e 81000000 2ece0000 40279127 d758f099 bfc253a9 fffffc03 0042f7ad 004327e4 61000200 00008e4e 00000014 00000000 2000a448 00000001 0041f919 00000000
                        Spinning module during software reset: Network, available RAM 15652 bytes (slot 3)

                        Error status: 0
                        [ERROR] 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 19.1, current 22.1, max 24.2
                        Supply voltage: min 0.4, current 0.7, max 0.9, under voltage events: 0, over voltage events: 0
                        Driver 0: ok
                        Driver 1: ok
                        Driver 2: ok
                        Driver 3: ok
                        Driver 4: ok
                        Date/time: 1970-01-01 00:00:00
                        Slowest main loop (seconds): 0.002416; fastest: 0.000032
                        === Move ===
                        MaxReps: 0, StepErrors: 0, MaxWait: 0ms, Underruns: 0, 0
                        Scheduled moves: 0, completed moves: 0
                        Bed compensation in use: none
                        Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                        Probe change coordinates:
                        === Heat ===
                        Bed heater = 0, chamber heater = -1
                        Heater 1 is on, I-accum = 0.0
                        === GCodes ===
                        Segments left: 0
                        Stack records: 2 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 ready with "M122" 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
                        Code queue is empty.
                        Network state is changing mode
                        WiFi module is trying to connect
                        SPI underruns 1, overruns 0
                        WiFi firmware version 1.19-alpha1
                        WiFi MAC address 5c:cf:7f:37:8b:19
                        WiFi Vcc 3.11, reset reason Turned on by main processor
                        WiFi flash size 4194304, free heap 9128
                        HTTP sessions: 0 of 8
                        FTP state 0
                        Telnet state 0
                        Wifi module is idle

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          dc42 administrators
                          last edited by 10 May 2017, 16:54

                          Hi Matthew,

                          Thanks for trying that version.

                          Your reset data indicates a firmware error, but I no longer have the intermediate files I need from the 1.19alpha1 build to track it down. Please can you upgrade your DuetWiFiFirmware to 1.19alpha2 and see if you still get the resets when it is connected to your iPhone. If so then post the M122 report again. See https://github.com/dc42/RepRapFirmware/blob/dev/WHATS_NEW.md for 1.19alpha2 upgrade notes.

                          I expect to have an update to the DuetWiFiServer code soon, and when I have released that it may be worth seeing if the Duet can connect to your works network 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
                          • undefined
                            percar
                            last edited by 10 May 2017, 23:12

                            I am also having issues wit\h DuetWifi. I had an issue where the firmware got corrupted while updating firmware 1.18. The duet was locked up and couldnt even connect using USB. I used Sam BL to reinstall 1.18 but could not get the wifi running. I updated to 1.19 Alph and followed the instructions for installation. It worked. When i tried again after another print the wifi could not be connected again. This time nothing I do will allow me to connect. I can still connect over USB and the display still works
                            This is what i get from the diagnostics
                            SENDING:M122
                            === Diagnostics ===
                            Used output buffers: 1 of 32 (8 max)
                            === Platform ===
                            Static ram used: 28556
                            Dynamic ram used: 79644
                            Recycled dynamic ram: 2392
                            Stack ram used: 3680 current, 4892 maximum
                            Never used ram: 15588
                            Last reset 00:01:20 ago, cause: power up
                            Last software reset code 0x1003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0440f80f, BFAR 0xe000ed38, SP 0xffffffff
                            Spinning module during software reset: GCodes, available RAM 15876 bytes (slot 3)
                            Error status: 0
                            [ERROR] 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 36.4, current 37.9, max 39.6
                            Supply voltage: min 12.4, current 12.4, 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: 1970-01-01 00:00:00
                            Slowest main loop (seconds): 0.004684; fastest: 0.000137
                            === Move ===
                            MaxReps: 0, StepErrors: 0, MaxWait: 0ms, Underruns: 0, 0
                            Scheduled moves: 0, completed moves: 0
                            Bed compensation in use: none
                            Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                            Probe change coordinates:
                            === 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: 2 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 ready with "M122" 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
                            Code queue is empty.
                            Network state is running
                            WiFi module is idle
                            SPI underruns 3, overruns 0
                            WiFi firmware version 1.19-alpha1
                            WiFi MAC address 18:fe:34:cb:01:c9
                            WiFi Vcc 3.06, reset reason Turned on by main processor
                            WiFi flash size 4194304, free heap 9128
                            HTTP sessions: 0 of 8
                            FTP state 0
                            Telnet state 0

                            M122
                            SENDING:M122
                            === Diagnostics ===
                            Used output buffers: 1 of 32 (8 max)
                            === Platform ===
                            Static ram used: 28556
                            Dynamic ram used: 79644
                            Recycled dynamic ram: 2392
                            Stack ram used: 3680 current, 4988 maximum
                            Never used ram: 15492
                            Last reset 00:01:22 ago, cause: power up
                            Last software reset code 0x1003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0440f80f, BFAR 0xe000ed38, SP 0xffffffff
                            Spinning module during software reset: GCodes, available RAM 15876 bytes (slot 3)
                            Error status: 0
                            [ERROR] 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 36.7, current 38.4, max 39.1
                            Supply voltage: min 12.4, current 12.5, 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: 1970-01-01 00:00:00
                            Slowest main loop (seconds): 0.004723; fastest: 0.000137
                            === Move ===
                            MaxReps: 0, StepErrors: 0, MaxWait: 0ms, Underruns: 0, 0
                            Scheduled moves: 0, completed moves: 0
                            Bed compensation in use: none
                            Bed probe heights: 0.000 0.000 0.000 0.000 0.000
                            Probe change coordinates:
                            === 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: 2 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 ready with "M122" 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
                            Code queue is empty.
                            Network state is running
                            WiFi module is idle
                            SPI underruns 4, overruns 0
                            WiFi firmware version 1.19-alpha1
                            WiFi MAC address 18:fe:34:cb:01:c9
                            WiFi Vcc 3.06, reset reason Turned on by main processor
                            WiFi flash size 4194304, free heap 9128
                            HTTP sessions: 0 of 8
                            FTP state 0
                            Telnet state 0

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              dc42 administrators
                              last edited by 11 May 2017, 08:02

                              Have you tried sending M552 S-1 followed by M552 S1 to reset and restart the WiFi module?

                              I hope to release an update to DuetWiFiServer later today.

                              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
                              • undefined
                                Matthew B
                                last edited by 12 May 2017, 07:28

                                Still getting errors and resets, using the latest release

                                Last software reset code 0x1001, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0440f80f, BFAR 0xe000ed38, SP 0xffffffff
                                Spinning module during software reset: Network, available RAM 15956 bytes (slot 0)

                                HTTP/1.1 500 overflow
                                Connection: close

                                I seem to be getting a step closer, at least I can request and get served html404.html

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  dc42 administrators
                                  last edited by 12 May 2017, 07:43

                                  @Matthew:

                                  Still getting errors and resets, using the latest release

                                  Last software reset code 0x1001, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0440f80f, BFAR 0xe000ed38, SP 0xffffffff
                                  Spinning module during software reset: Network, available RAM 15956 bytes (slot 0)

                                  HTTP/1.1 500 overflow
                                  Connection: close

                                  I seem to be getting a step closer, at least I can request and get served html404.html

                                  Thanks. Please let me know if you get any resets with a software reset code other than 0x1001, like the one you reported before.

                                  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
                                  • undefined
                                    Matthew B
                                    last edited by 5 Dec 2017, 10:13 12 May 2017, 10:05

                                    Last reset 00:00:22 ago, cause: reset button or watchdog
                                    Last software reset code 0x0031, HFSR 0x40000000, CFSR 0x00008200, ICSR 0x0440f803, BFAR 0x0a9d0a9c, SP 0x2001fe5c
                                    Stack: 0041ae99 0041e5b2 81000000 00000000 ffffffe9 2000a540 00000001 00000001 00000002 2001fee8 0041af53 0041af9a 21000000 00000000 ffffffe9 2000b868 00000001 00000000
                                    Spinning module during software reset: Network, available RAM 15652 bytes (slot 2)

                                    Webserver: rejecting message with: not found

                                    What is not found? Am I missing a SD card file? Everything has been extracted to /www

                                    Also WiFi firmware version reports 1.19-alpha1 not alpha2 but has been upgraded.

                                    Thank you for your continued effort.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      dc42 administrators
                                      last edited by 12 May 2017, 19:47

                                      Thanks for your report. That gives me a very good idea of what went wrong.

                                      The firmware for the WiFi module (DuetWiFiServer) is still at 1.19alpha1, it's only DuetWiFiFirmware that is at 1.19alpha2.

                                      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
                                      • undefined
                                        Matthew B
                                        last edited by 22 May 2017, 07:46

                                        Firmware Name: RepRapFirmware for Duet WiFi
                                        Firmware Electronics: Duet WiFi 1.0
                                        Firmware Version: 1.19alpha3 (2017-05-09)
                                        WiFi Server Version: 1.19-alpha1
                                        Web Interface Version: 1.16

                                        Using an iphone as a hotspot I can connect for a few seconds via DWC, then I get: An AJAX error has been reported….....

                                        08:29 22/05/2017
                                        Last software reset code 0x1001, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0043380f, BFAR 0xe000ed38, SP 0xffffffff
                                        Spinning module during software reset: Network, available RAM 8868 bytes (slot 4)

                                        08:31 22/05/2017
                                        Last software reset code 0x0031, HFSR 0x40000000, CFSR 0x00008200, ICSR 0x0440f803, BFAR 0x447a0000, SP 0x2001fe5c
                                        Stack: 0041ae99 0041e5b2 81000000 80000000 bfd802a3 e974b355 3facf963 fffffc02 00430121 004334aa 81008a00 000002f3 09c0b000 0042fed2 01000000 2000a540 00000001 00000000
                                        Spinning module during software reset: Network, available RAM 15652 bytes (slot 0)
                                        Error status: 0

                                        08:36 22/05/2017
                                        Last software reset code 0x1031, HFSR 0x40000000, CFSR 0x00008200, ICSR 0x0440f803, BFAR 0x505c0f91, SP 0x2001fe44
                                        Stack: 0041a227 004350a0 21000000 400c0000 200065c8 00000000 0041a343 0041a348 81000000 0000000b 00000000 00000000 ffffffe9 2565c18a 3e05f204 00000000 00430030 000002e2
                                        Spinning module during software reset: Network, available RAM 15652 bytes (slot 1)

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          dc42 administrators
                                          last edited by 22 May 2017, 07:54

                                          Please switch to 1.19beta1 and try again. See https://www.duet3d.com/forum/thread.php?id=1620 for upgrade instructions.

                                          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