I’ve been battling Ethernet problems for months, and I’m finally at the point where I really need to get them resolved. I’m running an Ethernet shield on a Due, connected by an Ethernet cable directly to a PC - no router, hubs, etc… When it works, it works fine. But, on power-up, there is perhaps a 1 in 4 chance it will work at the start. However, in most cases, if I simply wait, it will eventually connect and work fine. It may take a minute, it may take an hour. Or, it may never connect.
I can see by watching the LEDs on the shield that it is seeing packets, but what I see is a repeating sequence that is, I assume, the shield announcing it’s presence, and waiting to hear back from the PC. Eventually, they will connect and work just fine, and the LEDs make it immediately obvious when they are finally in the process of establishing a connection. When it doesn’t work, even ping does not work.
This occurs regardless of the code I run, including all the Ethernet example programs. I am using a hard-coded IP address (PC I/F is set to 10.9.9.1, and Arduino is set to 10.9.9.10). One odd thing: If I display Ethernet.localIP during start-up, it invariably shows the WRONG address! right now, it shows 255.0.255.255. I’ve seen many other values, but it is generally all 255s and 0s.
I’ve tried multiple PCs, cables (both straight and cross-over), Arduino, Ethernet shields, and applications, and ALL behave exactly the same.