Solved Very slow startup of new WiFi module on a 3 6HC
-
I got my new Duet 3 6HC yesterday and just started preparing it for the printer.
- firmware (standalone mode) updated to 3.5.0 b4 (still using the supplied SD card)
- turned Duet off,
- installed the Wifi module I thankfully got from the italian Duet reseller Compass DHM (the german ones do not offer the module yet)
- turned Duet on,
- installed Wifi module firmware file (1st attempt: the new 2.1beta4 firmware file for the Wifi module , 2nd attempt: the older 2.1 beta3 variant),
- started the module with
M552 I1 S0
- added my network with
M587 S"my-WLAN-SSID" P"my-password" I[the printer's IPv4 address] J[the Gateway IP] K255.255.255.0
... and was happy to see the module connected immediately:
Then I turned off power and turned it on again. And waited... The module needed four minutes to start and connect.
I wondered and downgraded the module to the beta3 firmware. Again, it connected immediately and connected to the WLAN:
But on the next boot, it took just as long:
The last time I saw such a startup time was ages ago when a friend tried to install Windows 98 on his slow i486... is this delay intentional or required or is this some kind of firmware bug? (I dearly hope it is the latter - my old Duet 2 Wifi boots and connects faster than the PanelDue!)
As soon as the module has finished its morning coffee and is up and running it works perfectly fine by the way. The config.g for the Duet is still almost empty so far, only the network is configured yet:
;Enable network M550 P"Duplimatix" ; Machine name M552 I0 S1 ; Ethernet active - not needed, just to remove that message on PanelDue... M552 I1 S1 ; WLAN module active M586 P0 S1 ; HTTP server active M586 P1 S0 ; FTP off M586 P2 S0 ; Telnet off ;Enable PanelDue M575 P1 S1 B115200
-
-
@NeoDue it should not take that long, except in some cases on the first startup after flashing new firmware, or if you use M587 S"*" to delete all saved access point details. In these cases it may take a while because it has to initialise the flash filesystem in the wifi module.
Please try WiFi firmware 2.1-beta4 again.
-
@dc42 The first start today did not take four minutes but ten.
I tried switching back to the new firmware but that did not change anything. Then I tried resetting the module by deleting the saved networks and then handling as if it was new (flash firmware once again, start module, add network etc) - but this time I waited 10min, rebooted and waited 10min more between each step to let the module finish whatever it liked whenever it liked. That did not help in the least. Again, the first start was great, but any boot with the module active took ages.After several more fruitless attempts some gut feeling made me change the config.g to this:
; Enable network except WLAN module M550 P"Duplimatix" ; Machine name M552 I0 S1 ; Ethernet active M586 P0 S1 ; HTTP server active M586 P1 S0 ; FTP off M586 P2 S0 ; Telnet off ; Enable PanelDue M575 P1 S1 B115200 ; Enable WLAN module G4 P5000 ; wait a bit... M552 I1 S1 ; WLAN module active
... and suddenly the module started like a charm!
Doublechecking by switching back to the previous config.g order confirmed this.
This means it is some kind of timing or startup order issue. From what I can see maybe the PanelDue start command causes the hiccup if executed while the module is still initialising, or the module might be started too early to be recognised correctly by the CPU which then triggers the formatting procedure you mentioned or such...?Edit: it's definitely those five seconds that make the difference. As soon as you delete that line the module starts in slow motion.
What I do get though with the new firmware is a weird WiFi Server information in DWC:
2nd Edit - offtopic, just in case someone else wants to do this as well: keep the WiFi antenna away from the PanelDue. I intended to put it into or onto the same housing, in a horizontal position below/above oder behind the PanelDue, but that turned out to be a really bad idea in terms of connection stability.
-
@NeoDue thanks for the update. Please run M122 and post here the WiFi section of the response.
-
@dc42 Here you are, the firmware version is noted correctly there:
M122 = WiFi = Interface state: active Module is connected to access point Failed messages: pending 0, notready 0, noresp 0 Firmware version 2.1beta4 MAC address 70:xx:xx:xx:xx:xx Module reset reason: Power up, Vcc 0.00, flash size 4194304, free heap 223572 WiFi IP address 192.168.xxx.xxx Signal strength -77dBm, channel 2, mode 802.11n, reconnections 0 Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
-
@NeoDue as noted in https://forum.duet3d.com/topic/33781/duet-3-wifi-module-firmware-2-1b4-random-disconnects, wifi module firmware 2.1beta6 seems to have solved this issue as well. It seems no delay is needed for a correct connection.
Therefore marked as solved as well.
-