adafruit / Adafruit_CircuitPython_Wiznet5k

Pure-Python interface for WIZNET 5k Ethernet modules
Other
15 stars 37 forks source link

DHCP fails if the reset pin is used #128

Closed fasteddy516 closed 1 year ago

fasteddy516 commented 1 year ago

If I use the reset pin with DHCP enabled the script fails every time with TimeoutError: No DHCP response received. I suspect the DHCP process might be starting before the network link (which drops momentarily when reset is toggled) has come back up.

Increasing the delay after toggling reset from 0.1s to 1.0s fixes the issue for me.

fasteddy516 commented 1 year ago

Apologies, increasing the delay to 1 second does not fix the issue for me - I forgot to re-enable DHCP after changing the delay the first time. I experimented with the delay time and ultimately found that a 5 second delay after setting reset.value = True prevents DHCP from failing during initialization.

Note that DHCP works perfectly fine if I don't bother to use the reset pin - it's only if the reset pin is utilized that DHCP fails on driver initiallization.