Duet Ethernet boards running very slowly or pausing indefinitely
-
I have a small number of reports of Duet Ethernet-based printers very occasionally pausing indefinitely during a print, or executing moves individually with long pauses between moves. While investigating this I have found that one possible cause is the DHCP client code, especially if it senses a possible IP address conflict. Therefore, if you have a printer that suffers from this problem:
- If you are already using a static IP address (by specifying a nonzero IP address in your M552 command), say so in this thread.
- If you are not using a static IP address, please try setting one in the M552 command, restart, and see whether this resolves the problem.
I intend to fix this DHCP issue, but I need to know whether to go on looking elsewhere for possible causes of this problem.
-
No problem using static ip here
-
no problems, using static IP address (Duet Wifi)
-
I am not using a static address, I'm using DHCP and an address which is reserved in the router table. I have had 2 of these pause issues, but none since I changed my gcode scripts to reset the network interface between prints.
-
Thanks for your replies. After reviewing the DHCP code (which came from the library supplied by Wiznet, the maker of the Ethernet interface chip we use), I think I have spotted a bug that is causing this issue. The sequence is:
-
When you enable networking on a Duet Ethernet (normally as part of the startup procedure), if you haven't set a static IP address then the Duet asks your router (or other DHCP server) for an IP address
-
The router assigns an address and specifies a lease time for which the IP address is available
-
When half of the lease time has expired, the Duet asks the router to renew the lease
-
The router responds by giving the Duet a new lease for the same IP address
-
At this point a bug may be triggered (possibly depending on the network configuration or the behaviour of the DHCP server and any Ethernet switches involved - I am not sure), which causes the go-slow symptom.
If I am right, then the following would be workarounds:
-
Use a static IP address so that DHCP is not used
-
Make sure that the print will finish before half the DHCP lease time has expired since the network was last started. To achieve this you may need to configure the DHCP server to grant longer leases, and/or stop and restart the network interface just before starting a print.
-
-
I added code gcode to stop/restart network at the start of each print, and the problem happened again 2-3 hours into the print. I tried to rest the network interface to see if it would speed up, and it would not. I even pulled the network cable, and that didn't help either.
I have code in my turn-off macro which does an M999. I'll change my router config to never expire DHCP leases –if you think setting a static IP will fix it -- I can do that too. -
Until I release 1.21RC3 with the DHCP issue fixed, I recommend that you use a static IP if you are having these problems. I have discovered multiple bugs in the W5500 sample DHCP code, so you are better off avoiding using it altogether for now.
Do you have just one Duet Ethernet on your network, or more than one? I think one of the bugs affects only users with more than one.
-
I only have one. I believe the issue is biting me more than others because I am keeping my duet on all the time with a 5v PSU – and I use M80/M81 commands to control the 24v PSU + other components -- I have a raspberry pi listening to the power on pin and then it turns on relays for the 24v PSU + a 12v PSU for cooling fans, as well the relays for the AC SSR to the bed -- I find even the best SSRs leak, so I like to cut their power off completely. The Pi also does some other functions like web cam streaming and emails when print starts/ends (it polls the duet every 30 seconds).
I like having the screen and buttons on the screen turn the printer on/off -- I made macros for that.
I will switch to static IP -- I also have no option in my router to change the DHCP lease time -- it's locked to 24 hours...kinda sucks that it's an expensive home office router and doesn't have that option...