Ethernet Module needs hard reset to receive after upload?
I'm using the ethernet module to send data to a Raspberry Pi and to get time updates from an NTP server running on the RPi. When I upload my sketch to the Industruino Ind I/O it will send data but cannot receive the NTP (UDP) messages. If I power off the Ind I/O and power back on everything works. My sketch waits for the serial monitor to open, so if I upload the sketch, wait until the upload is complete, press the reset button on the ethernet module, then open the serial monitor, everything works. So, it looks like the ethernet module requires a hard reset after an upload to be able to receive. Is this a hardware problem, a library problem, or a feature?
Ok, I finally have this working, here's the code snippet:
const int RESET_PIN = 5;
// Reset ethernet module
// Wait for the module to reset
// Ethernet setup
Ethernet.begin(mac, localIp, dnsServerIp, gatewayIp, subnetIp);
int udpStatus = Udp.begin(localPort);
// give Ethernet shield one second to initialize
Indeed the Ethernet module would need a reset or power cycle after uploading a new sketch in order to work correctly.
As an alternative to manually resetting the module you can also initiate a reset from within sketch control. Nearby the reset button on the ethernet module you will find a solder jumper labelled "ext-rst": if you close this jumper with some solder it will connect the reset chip's manual reset pin to pin D5 of the Industruino. By writing a LOW for say a couple of miliseconds to this pin, it will trigger the reset chip to reset the ethernet chip.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Forum
This community is for professionals and enthusiasts of our products and services.Read Guidelines
|Asked: 3/3/16, 5:30 PM|
|Seen: 3054 times|
|Last updated: 3/15/16, 8:54 PM|
I confirmed the above with a second ethernet module. I connected the ext_rst pads with solder. The above code does reset the ethernet module, but I cannot receive even after a power cycle. Any suggestions?