Closed pulli7 closed 7 years ago
Issue reproduced. This is under investigation.
Hi all, maybe the PR #5 fix this issue as the Ethernet scheduler is called by timer every 1ms?
Gave it a quick try:
Looks like it changes the behavior in the way, that now calling Ethernet.begin() a second time, after the first try failed, always locks the program inside the function, no matter if ethernet is still unavailable or not.
@pulli7 Could you try the PR #5? It fixes your issue when several call of begin().
Confirmed, issue is fixed. Thank you again @fprwi6labs !
You're welcome @pulli7 . @fpistm you can close all those issues.
Thanks guy.
I'm having the same problem with my Arduino UNO and ethernet shield. How exactly do I fix the problem when it hangs?
Examples of hanging:
It works fine when:
This library is designed for STM32 boards with native Ethernet. You should submit your issue on https://github.com/adafruit/Ethernet2 or https://github.com/arduino/Arduino/tree/master/libraries/Ethernet depending of your shield.
In the past, with the Arduino-Ethernet-Shield, I used the following code to wait for ethernet connection to get available, so that I can have at least some limited functionality when ethernet is not available at this time, and automatically jump to full functionality as soon as link gets available.
With the Nucleo 429ZI this does not work. As long as the cable is unplugged everthing is fine, but as soon as it is plugged in and ethernet gets available, the program gets locked inside the Ethernet.begin() function and never returns.
Am I misusing the function and it worked just coincidentally with the standard ethernet-shield, or is this a bug? If this usage of the begin() function is not intended, is there another way to achieve that the board tries reconnecting itself?