Hi,
I am trying to address the following use case in an automated fashion: in the case of ethernet interface, ethernet cable is unplugged from existing switch and then plugged into switch with different IP/Mask/Gateway setup.
I tried disconnect() before connect(), delete and create new EthernetInterface, toggle reset pin of ethernet Phy IC, none of these approaches work reliably even when cable is unplugged and then plugged back to the same switch. Sometimes it takes 60+ seconds to timeout, or system hangs all together, sometimes connect() and getting IP will succeed but gets -3001 error when trying to use it to connect to network.
On the other hand, reset and reboot system always work. Is this the only way?
Please advise. Thanks.