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

    1.19beta7 and WiFi connect

    Scheduled Pinned Locked Moved
    Firmware installation
    3
    30
    4.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.
    • juniormajprundefined
      juniormajpr
      last edited by

      just uploaded WiFiServer beta8 and everything works as expected.
      only get an error once while trying connect/disconnect/change mode now for 30+ times.
      the error was:

      [[language]]
      WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
      
      

      unfortunately i hurried to much, and i resettet the Duet, so i can't say if the above error is "self-healing" or not (retry after a timeout or something like this).
      but it didn't occur a second time

      @dc42: thx!

      1 Reply Last reply Reply Quote 0
      • juniormajprundefined
        juniormajpr
        last edited by

        upps… did it again...
        after some hours online a reboot was needed, and afterwards no WiFi connection was establised.

        [[language]]
        >>> M552
        SENDING:M552
        WiFi module is idle
        >>> M552 S1
        SENDING:M552 S1
        WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
        Wifi module is idle
        
        

        And no, it isn't an error of me that the "currentSsid" which should come after "… connect to ..." is missing.
        So i think the config couldn't be read although M587 did list the known SSIDs

        [[language]]
        >>> M587
        SENDING:M587
        Remembered networks:
        xxxx yyyy z.z
        
        
        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          Thanks, that gives me something to go on. If you try sending M552 S1 a few more times, does it connect eventually? If not, try M552 S-1 followed by M552 S1.

          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
          • juniormajprundefined
            juniormajpr
            last edited by

            nope… this time no changes...

            [[language]]
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S-1
            SENDING:M552 S-1
            WiFi module stopped
            >>> M552 S1
            SENDING:M552 S1
            WiFi module started
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S1
            SENDING:M552 S1
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            >>> M552 S-1
            SENDING:M552 S-1
            WiFi module stopped
            >>> M552 S1
            SENDING:M552 S1
            WiFi module started
            WiFi reported error: Unexpected WiFi state 'idle' while trying to connect to
            Wifi module is idle
            
            

            15-30 seconds between each try.

            1 Reply Last reply Reply Quote 0
            • juniormajprundefined
              juniormajpr
              last edited by

              ok tested a little bit more… there seems to be a bug with EEPROM put/get.

              szenario: all known SSIDs are deleted with M588 S"" and all AP configurations are deleted also with M589 S"".

              [[language]]
              M588 S"*"
              ok
              M589 S"*"
              ok
              M587
              No remembered networks
              ok
              
              

              after that i established an AP config which is listed correctly with M587

              [[language]]
              M589 S"duet" P"duet" I192.168.1.1
              ok
              M587
              Remembered networks:
              duet
              ok
              
              

              when i try to start AP mode -> error, but AP config seems to be still stored

              [[language]]
              M552 S2
              ok
              WiFi reported error: Failed to start access point
              Wifi module is idle
              M587
              Remembered networks:
              duet
              ok
              
              

              add an client config and list again known configs the AP config is gone

              [[language]]
              M587 S"test" P"test"
              ok
              M587
              Remembered networks:
              test
              
              
              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators
                last edited by

                M587 should not list the AP name as a remembered network if you are using beta 8 of DuetWiFiFirmware. Please check which version you are running. Tomorrow I'll check for coding errors in that area.

                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
                • juniormajprundefined
                  juniormajpr
                  last edited by

                  WifiServer beta8 and RRF beta8. see below:

                  [[language]]
                  M122
                  === Diagnostics ===
                  Used output buffers: 1 of 32 (1 max)
                  === Platform ===
                  RepRapFirmware for Duet WiFi version 1.19beta8 running on Duet WiFi 1.0
                  Board ID: xxxx
                  Static ram used: 20900
                  Dynamic ram used: 96084
                  Recycled dynamic ram: 1800
                  Stack ram used: 3960 current, 4784 maximum
                  Never used ram: 7504
                  Last reset 00:00:47 ago, cause: power up
                  Last software reset reason: User, spinning module GCodes, available RAM 7180 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 -210.4, current 41.4, max 41.5
                  Supply voltage: min 0.1, current 0.5, max 0.8, 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.001695; fastest: 0.000027
                  === 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
                  === 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
                  WiFi firmware version 1.19beta8
                  WiFi MAC address aa:bb:cc:dd:ee:ff
                  WiFi Vcc 3.10, reset reason Turned on by main processor
                  WiFi flash size 4194304, free heap 41104
                  HTTP sessions: 0 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)
                  ok
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by

                    OK, I found the bug, it's purely a reporting issue. If you have no remembered networks but you have specified an access point name, then when you list remembered networks it prints the access point name. After you have added a remembered network, you can still retrieve the own access point name by sending M589. The fix will be in the next beta.

                    I still haven't worked out why it's trying to connect to an empty SSID. I'll look at that 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
                    • juniormajprundefined
                      juniormajpr
                      last edited by

                      @dc42: as per definition the passphrase within the AP mode hast to be at least 8 chars long, i think it would be reasonable to check for valid M589 input (i think ssid min 0 max 32 chars and passphrase min 8-64 chars).
                      try:

                      [[language]]
                      M552 S0
                      ok
                      WiFi module started
                      
                      M589 S"test" P"test" I192.168.1.1
                      ok
                      M552 S2
                      ok
                      WiFi module started
                      WiFi reported error: Failed to start access point
                      Wifi module is idle
                      
                      M589 S"test" P"testtest" I192.168.1.1
                      ok
                      M552 S2
                      ok
                      Wifi module is providing access point test, IP address 192.168.1.1
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators
                        last edited by

                        Thanks for the suggestion, I'll implement it in the next beta.

                        I can't reproduce the problem with failing to connect and not displaying the SSID name, but I've built a new DuetWiFiServer.bin with some changes that may help and put it at https://dl.dropboxusercontent.com/u/19369680/DuetWiFiServer.bin. Please try it.

                        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
                        • juniormajprundefined
                          juniormajpr
                          last edited by

                          will give it a try. will give feedback tomorrow.
                          is there the possibility to erase the ESP (incl. flash) completly from SAM/RRF? or only via ISP?

                          1 Reply Last reply Reply Quote 0
                          • juniormajprundefined
                            juniormajpr
                            last edited by

                            @dc: i think i found the reason, why an empty config was read…

                            SocketServer.cpp - row 64

                            [[language]]
                            for (size_t i = 1; i <= MaxRememberedNetworks; ++i)
                            
                            

                            shouldn't it be```
                            [[language]]
                            for (size_t i = 0; i <= MaxRememberedNetworks; ++i)

                            same in row 83
                            
                            or better (i think) not to waste one slot at the beginning (row 64, 83, 112, 521,…)
                            

                            [[language]]
                            for (size_t i = 0; i < MaxRememberedNetworks; i++)

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

                              The first entry is the configuration for the WiFi module as an access point. So the count starts from 1 when it is searching for a remembered SSID.

                              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
                              • juniormajprundefined
                                juniormajpr
                                last edited by

                                hmmm… once again:

                                [[language]]
                                for (int8_t i = 0; i < num_ssids; ++i)
                                {
                                	if ((strongestNetwork < 0 || WiFi.RSSI(i) > WiFi.RSSI(strongestNetwork)) && RetrieveSsidData(WiFi.SSID(i).c_str(), ssidData))
                                	{
                                		strongestNetwork = i;
                                	}
                                }
                                
                                

                                WiFi.RSSI's and WiFi.SSID's parameters are a zero based index from prior discovered SSIDs by blocking WiFi.scanNetworks(false, true)
                                At this point we are looking at the wrong index. aren't we? ++i -> i++

                                1 Reply Last reply Reply Quote 0
                                • juniormajprundefined
                                  juniormajpr
                                  last edited by

                                  @dc: 1.19beta8+1 doesn't change the WiFi behaviour. but can you plz. confirm/check the above post?

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

                                    Using ++i or i++ does exactly the same thing if the operand has primitive type and you don't use the value within the same expression, as in this case.

                                    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
                                    • Zestundefined
                                      Zest
                                      last edited by

                                      I just got a Duet Wifi and I'm having a hell of a time with the WIFI setup. I have tried flashing 1.18 stable as well as 1.19 beta 8. I first attempted upgrades via M997 but eventually tried the erase/reset/reload via samba. I have gotten it to connect once or twice but it seems whenever I edit config.g to uncomment M552 S1 it fails to connect again after reboot. I have fiddled with it quite a bit since then and haven't been able to get it to talk to my router again.

                                      I've noticed a couple things

                                      1. when using 1.18 M552 will say that the board is in AP mode but I can't see it in my list of WIFI networks.
                                      2. when it does this it also says hostname is some bunch of gibberish ascii characters
                                      3. when using 1.19 Beta 8 M587 returns the two remembered networks I have configured in my SetNetwork macro however when I do a M552 S1 I get

                                      M587
                                      SENDING:M587
                                      Remembered networks:
                                      seawest
                                      seawest 5G
                                      M552 S1
                                      SENDING:M552 S1
                                      WiFi reported error: no known networks found
                                      Wifi module is idle

                                      I'm starting to think the board is faulty. Is there anything else I can try? It's almost as if the WIFI module is retaining some kind of garbage. Is there a way to purge everything so I'm starting fresh? SD Card, memory, everything?

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

                                        The "no known networks found" message means that it did a network scan and didn't find either of the SSIDs you configured. How strong is the signal from your router where the Duet is? Is the Duet surrounded by metalwork that would attenuate the signal?

                                        The Duet WiFi does 2.4GHz only, and I presume seawest 5G is a 5GHz access point.

                                        I think access point names are case sensitive. Is 'seawest' exactly how your access point name appears when you connect to it from a smartphone, tablet etc. ?

                                        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
                                        • Zestundefined
                                          Zest
                                          last edited by

                                          wow thanks for the quick reply. seawest is the name of my 2.4 Ghz network and my seawest 5G is my 5 Ghz network. Both are off of the same ASUS router that sits about 10 feet away. The names are case sensitive and exactly as they're seen from my iphone. My password is alphanumeric and only contains letters and a number.

                                          The thing that makes me suspicious that the board is bad is the fact that I don't see "Duet WIFI" when the board thinks it's in AP mode when using 1.18. Are there any debug commands I can use to test the functionality of the WIFI module itself? I was able to get the board to connect a handful of times and it seemed tied to loading a new WIFI firmware. However, I have tried reloading firmware several times since then and I haven't been able to re-establish a connection.

                                          I WAS able to connect to the "Duet WIFI" SSID but only once. When that occurred I could see my neighbor's APs as well as my own. I was also able to get into the web interface but as soon as I uncommented "M552 S1" and rebooted I had the same problems all over again and could not reconnect.

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

                                            When you are using firmware 1.18 and the Duet reports that it is in AP mode, you should be able to find it in the network listing on your smartphone assuming your smartphone isn't only looking for 5GHz networks. If you can't, ask for the Duet to be replaced.

                                            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