I am wondering if it is possible to reset a W5100 shield (DFRobot DFR0125) via software similar to if you were to press the RST_W button on the shield and then reset the Arduino Mega (also via software)?
The reason I would like to do this is because I am experiencing the issue described below:
I am using a DFRduino Mega1280 ( DFRduino Mega1280 (Arduino Mega Compatible) - DFRobot ) along with a DFRduino Ethernet Shield v2.2 (their website only shows v2.1 : DFRduino Ethernet W5100S Arduino Compatible - DFRobot ) which were both purchased last week from DigiKey.
I have a webserver running on the Mega that would display sensor data via a website and allow a log file to be downloaded. I noticed that (not often) if the USB cable is disconnected from the computer and then reconnected the yellow link light on the front RJ45 jack and the link light on the shields board blinks continuously at a constant interval and network connectivity is not established (though my code still runs in the main loop). The same result happens when the USB is disconnected from the computer and the Mega is powered by a 9V adapter. That is, if you turn on and off the power to the 9V adapter, then on occasion the above issue happens.
There are two reset buttons on the shield, one of them appears to reset the Arduino (marked "RST") while the other, marked “RST_W” appears to reset the Ethernet shield. Resetting the Arduino in this state (loss of network connectivity) does not cause the shields link light to stop blinking continuously at a constant rate, and network connectivity is not restored. Resetting the Ethernet shield (via RST_W button -- causes link light to stop blinking continuously) and then the Arduino (via "RST" button) allows for connectivity to be re-established. (I think one time I had to press RST_W twice).
I also found that when the shield is in this state where the link light blinks at a constant rate; that disconnecting power from my Ethernet switch (where my shield is connected to) and reconnecting power causes the shields link light to stop blinking continuously, network connectivity is restored and there is no need to reset the shield and then the Arduino. I disconnected my local switch which allowed for an Ethernet connection to my remote switch. With the remote switch the same issue / solution was replicated.
Also, if the link light is constantly blinking and you press the RST_W button on the shield, then if you reboot the switch, network connectivity is not restored (as opposed to if you only rebooted the switch). One must then reset the Arduino.
I uploaded an empty sketch with no code to the Mega. I removed all sensor/wires going to the shield along with the SD card. It only had an Ethernet connection and power (tried a 9V adapter in this test). I was able to replicate the issue where if one reset power to the 9V adapter, on rare occasions the link light will flash constantly and if you remove power from the switch then all lights on the shield except PWR go off. Then when the switch is reconnected the lights on the shield appear to blink “normally”.