You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to handle ethernet disconnection scenarios, however if I try to call ArduinoOTA.end() compiler returns with error: class EthernetServer' has no member named 'stop'
Upon closer inspection it looks like EthernetServer does not have a stop() method afterall.
What is the recommended way to proceed? What happens if I never call end()? Should I call begin() after reconnection?
I don't know what happens when server.begin() of Ethernet library is called again. it will try to create a new server with the same port and I don't know if it ends with error or if it creates it and how will it then behave.
Workaround until the answer is found: in case of ethernet disconnect I restart the microcontroller and wait for a normal ethernet connection to be estabilished. Once ethernet is (re)estabilished ArduinoOTA.begin() is called (only once).
This avoids the undefined behaviour detailed above.
Repository owner locked and limited conversation to collaborators on Jul 21, 2023
Activity
JAndrassy commentedon Jul 20, 2023
I don't know what happens when server.begin() of Ethernet library is called again. it will try to create a new server with the same port and I don't know if it ends with error or if it creates it and how will it then behave.
bakadave commentedon Jul 20, 2023
Thank you. I'm not familiar enough with these libs to figure it out on my own but I'm happy to help if you give me some pointers.
bakadave commentedon Jul 21, 2023
Workaround until the answer is found: in case of ethernet disconnect I restart the microcontroller and wait for a normal ethernet connection to be estabilished. Once ethernet is (re)estabilished
ArduinoOTA.begin()is called (only once).This avoids the undefined behaviour detailed above.