Intermittent WiFi Connection at Startup
-
Can you get that from the DWC gcode console tab so we can see the full report? It's the wifi section at the end that I'm most interested in.
-
Here you go:
6/7/2022, 4:02:06 PM M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.4.1 (2022-06-01 21:05:28) running on Duet WiFi 1.02 or later + DueX5v0.11 Board ID: 0JD0M-9X6JA-JUNSW-6J9DD-3SJ6T-9UJHS Used output buffers: 4 of 26 (26 max) === RTOS === Static ram: 23860 Dynamic ram: 76700 of which 0 recycled Never used RAM 8472, free system stack 112 words Tasks: NETWORK(ready,13.5%,211) HEAT(notifyWait,0.1%,324) Move(notifyWait,0.6%,294) DUEX(notifyWait,0.0%,24) MAIN(running,85.9%,423) IDLE(ready,0.0%,30), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 01:13:27 ago, cause: software Last software reset at 2022-06-07 14:48, reason: User, GCodes spinning, available RAM 8432, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x0c Aux0 errors 0,4,0 Step timer max interval 0 MCU temperature: min 43.4, current 44.1, max 48.6 Supply voltage: min 23.6, current 24.4, max 24.7, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/522/522, gc cycles 0 Events: 3 queued, 3 completed Driver 0: standstill, SG min 0 Driver 1: standstill, SG min 0 Driver 2: standstill, SG min n/a Driver 3: standstill, SG min 0 Driver 4: standstill, SG min n/a Driver 5: standstill, SG min 0 Driver 6: standstill, SG min 0 Driver 7: standstill, SG min 0 Driver 8: standstill, SG min 0 Driver 9: standstill, SG min 0 Driver 10: Driver 11: Date/time: 2022-06-07 16:02:06 Cache data hit count 4294967295 Slowest loop: 87.48ms; fastest: 0.14ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 6.7ms, write time 12.9ms, max retries 0 === Move === DMs created 83, segments created 8, maxWait 480015ms, bed compensation in use: mesh, comp offset 0.000 === MainDDARing === Scheduled moves 2988, completed 2988, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 18], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 Heater 0 is on, I-accum = 0.3 === GCodes === Segments left: 0 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 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === Filament sensors === Extruder 0 sensor: ok Extruder 1 sensor: no data received === DueX === Read count 13, 0.18 reads/min === Network === Slowest loop: 93.43ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 2 of 8 - WiFi - Network state is active WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.26 WiFi MAC address c8:c9:a3:40:81:97 WiFi Vcc 3.40, reset reason Power up WiFi flash size 2097152, free heap 25760 WiFi IP address 192.168.1.85 WiFi signal strength -50dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
-
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.