Intermittent WiFi Connection at Startup
-
The wifi server is up to date and the signal strength looks good. At least at that moment in time. So no smoking guns there.
The error message you're getting on the PanelDue: "Network scan failed" seems to indicate that it's unable to reach the AP at that time. Is there anything in the environment that could be causing temporary interference?
If it happens again, can you try sending these commands on the PanelDue instead of power cycling?
M552 S-1
M552 S0
M552 S1Could you also share your config.g?
-
This happens to me with my Duet 3 Mini wifi too. Same behaviour with all FW releases i've tried (3.3.x-3.4.1). Get the feeling the wifi module takes a little to long time to start up or something. Plan on trying to remove the wifi setup from config. And execute a macro at the very end of it with a couple seconds of dwell time between M552 S-1, M552 S0 & M552 S1 to see if that works around the issue.
-
@exerqtor That's a good idea. I was also wondering if some conditional gcode could be used to check the status and retry a few times or something like that to add some resiliency.
Really depends on if the issue is from the environment/router side or the module/firmware. I know the module does retry a few times on it's own, hence the multiple errors, but I'm not sure how long it waits.
-
@phaedrux
Thank you for looking into this!There is a message that looks like an error that pops up before the "Network scan failed" messages, but it flashes by too fast and I can't read it. I'll either capture it in a video or log it via USB.
Here's my config.g .
It's just so weird. Once it connects, I've never had it lose connectivity. It's only on startup that it gives me problems.
I'm in the middle of another long print, but when it finishes I'll capture the errors and try to reconnect the WiFi with your commands.
-
@tfjield said in Intermittent WiFi Connection at Startup:
There is a message that looks like an error that pops up before the "Network scan failed" messages, but it flashes by too fast and I can't read it. I'll either capture it in a video or log it via USB.
If you want to check config.g for errors, send M98 P"config.g" in the gcode console in DWC and any messages that may have been missed during startup will come up in the console. I'm guessing a heater over powered warning maybe.
-
@phaedrux
I took a video of the PanelDue when starting up to capture that first error. It says"WiFi module started"
"Error: WiFi module reported: Unexpected WiFi state 'Idle' when trying to connect to"
"WiFi module is idle"
" Error: WiFi module reported: no known networks found"
"WiFi module is idle"
"Error: WiFi module reported: network scan failed"And the last messages repeats until it finally gives up .
-
@Phaedrux
And after it was done booting, I entered the three commands via the console. The first time it successfully connected to the network. I rebooted a few times to get the failure again and tried it again. This second time it failed with the same series of errors. I repeated the commands and it connected to the network. I just repeated the commands again and got the errors, but then it connected at the end.
-
@exerqtor
What hardware do you use for your network? Mine is Unifi. I actually added another access point in my garage to make sure it wasn't a signal strength issue, but it didn't make a difference. -
@tfjield I'm on a Unifi network too, i've got a UAP-AC-PRO mounted in the ceiling two meters away from the printer with clear line of sight. Note that i had a Duet 2 Wifi v1.03 before, (upgraded to the Duet 3 Mini because i fried the CPU on the Duet2 ) and it never had this problem even with one of the 3.3 fw's.
-
@exerqtor I run Unifi AC Pro's too, and there are a couple of things I have found which improved connection stability for me with my printers and other home automation equipment (largely all ESP based wifi devices).
- Create a wifi network which operates in the 2.4gh band only - Many simpler wifi devices can have trouble with wifi access points that use the same network name on both 2.4 & 5Ghz bands.
- If you are running more than 1 Unifi AC Pro AP, then use the Unifi control software to force the printer to connect to the AP that is nearest/best signal. The automated processes that should manage this do not allways operate as expected.
Other things to consider - even if your network configuration hasn't changed, the environment its operating in might have... eg An external wifi network may have switched channels, or a new one has been setup which is causing interference...It might be worth running the channel scanning tools available in the Unfi control software to see if anything has changed.
-
@mintytrebor
Good advice! In my case my 2.4 GHz network has a separate SSID just for that reason, iot devices often aren't smart enough to navigate a dual network.I have had these issues with the Duet since day one. I added another AP to try to improve the situation, but it didn't help. And I recently scanned everything to make sure all was clear.
Seems a bit coincidental that both of us with problems are running Unifi... It's not THAT common. But could be a coincidence.
I really think there's either some kind of race condition. I thought it might be a voltage stabilization issue at startup, but since I get the same problems when I deactivate and reactivate the WiFi module, I don't think that makes sense.
-
@exerqtor
But the fact you didn't have problems with the Duet 2 suggests that it's not the network and something about the specific Duet board... -
When and where did you purchase the Duet 2 Wifi?
-
@phaedrux
It came with my Modix printer. I received it about 2 weeks ago. It was shipped with the other parts direct from China. -
Do you have another spare access point to test with? It would be good to isolate the issue before we go through the trouble of warranty replacement incase that won't actually solve the issue.
-
@phaedrux
I do. It had the same problem with the AP in the house, so I thought maybe it needed a higher signal strength, so I put a new AP close to it. (The strength was good already, but I didn't want to be blasting everything else indoors if it needed more.) But I can crank up the indoor power temporarily and try connecting to that one again (different SSID's, so that's easy) to see if it makes a difference.I can't do this until Monday, though. I'm sitting in a plane just about to take off! ️
-
@tfjield is that still another Unifi AP, or some other make/model?
-
@oliof It's Unifi. The current is model UAP, and the other one I can test is U6-LR.
-
@oliof @Phaedrux
I may have found something. On a hunch, I decided to replace the SD card with a faster one, thinking that there might be some kind of race condition occurring during startup.The card that came with it is a SanDisk Edge 8 GB class 4. Here's a stock image of the card:
I replaced it with a SanDisk Ultra.
With the original card it would boot and connect to WiFi no more than half the time. After replacing the card, it's connected 5 out of 5 reboots. I'll continue testing, but it seems much better!
EDIT: This is on the same AP; I've only changed the card.
-
@tfjield Interesting, keep us updated on this please
😅