Note on updating firmware in older boards- check ajax retries!
-
My sand table uses a Duet2 wifi board. For a long time it had problems maintaining the wifi connection on multiple wifi systems using different routers. It couldn't stay connected for more than about 1 minute and 7 or 8 seconds. I decided to dig into it again and found mention of the ajax retries in the wifi troubleshooting wiki. I found that setting ajax retries from default 2 to 5 fixed the dropped wifi connection problem.
Yesterday I was commissioning a "new" (version 1.02 hardware) board for a new project and wanted to update the firmware from 2.05.1 to more recent stuff. I got it working on my network, and like the sand table, had to set ajax retries to 5 to get it to stay connected. I went through the recommended sequence on updating to 3.0, then 3.3, and finally 3.4.6 and found that when I updated to firmware 3.3 the ajax retries got reset back to 2 which caused the connection to drop every 1 minute and 7 or 8 seconds until I set it to 5 again.
My current network uses a mesh router that includes sandboxed 2.4 GHz IOT network that I was connecting the duet2 board to, so the router shouldn't be trying to tell the board to reconnect on a 5GHz network.
Is there some reason the default ajax retries is 2 and not some higher number, or is my situation somehow very different from typical?
-
one for @chrishamm I think
-
@mrehorstdmd The reason why the number of AJAX retries is set to 2 and not higher is because that number affects the HTTP request timeout. If you have a slow connection (e.g. accessing a Duet via VPN from a poor connection), you'd get frequent disconnects because the default session timeout is set to 8000ms and the the timeout per HTTP request is calculated via
8000ms / (1 + ajaxRetries)
.It may be a good idea to upgrade to 3.5.1 now that it is out and also upgrade the WiFi server firmware to 2.1.0. You may find that it works better than previous versions. There have been several bug fixes and other WiFi-related improvements since 3.3/3.4 and WiFi server 1.2x.
-
@chrishamm Thanks! Updated. I'll let it run for a while and see how it goes. I do run a VPN on the computer that is accessing the Duet board. I'll try switching that off and see if it behaves differently.