If I try to give it a static address in the setup() section, the command works, but then when I try to have it tell me what IP address it got with a Serial.println(Ethernet.localIP()) in the loop() section, all I ever get is 0.0.0.0. If I try to get a DHCP address (like from the example DhcpAddressPrinter program), it just hangs forever. Using a packet sniffer, I never see any packets on the wire that have the given MAC address, no matter what I set it to.
The link and 100M lights are on. The RX light blinks. The light below the RX light blinks occasionally. I'm assuming it's the TX light, but, again, I never see any packets with the assigned MAC address. The L light never does anything. Is it supposed to?
This is my first foray into the world of Arduino, so maybe I'm overlooking something simple I have to do to the shield to make it operational? I've tested my network cable, so I know it's good.
I've just had an insight as I write this: Should I not have soldered ALL the connections between the shield and the relay board? Should I have cut off the ones I didn't need, as the ethernet functions just need pins 10-13? That wouldn't make much sense to me, but, hey, like I said, I'm a little lost here.
I'm seeing the exact same behavior from an R3 Ethernet Shield trying to work it from a BoArduino. I was personally working from the assumption that I had a DOA unit but after seeing your note...
Perhaps I'll pick up a bus-pirate to snoop the SPI traffic to/from the Ethernet Shield.
Can you ping the shield after setting up a static address?
Is the address inside the same subnet as the computer?
Are you sure you didn't solder something that should have been soldered? Would it be a big issue to remove the solder and give it a try with the connectors on? At least it's a good learning experience... never solder something without testing it first.
If I unsolder the shield from the arduino board, how will it get the programming to get an IP address? I originally thought about unsoldering some pins, but I can't accept that I shouldn't just solder them all. They're designed to all get pushed into the header on an arduino, and this relay board is supposed to be "board compatible."
Is your Ethernet Shield the latest (R3)? I seriously doubt it's a soldering issue. FWIW, I tried running it with minimal connections (10-13, RESET, 5V and GND) and still had the problem.
I don't know what revision it is. I can't see any number like that on it, but I wonder if it has the revision on the other side, where I can't read it.
Sadly, the optiboot bootloader made no difference. I also spent some time playing with lower lever routines in the ethernet library with no success, though I now understand why DCHP code hangs. At this point, I think the only option is to get a bus pirate and watch the SPI traffic. I'm positive that the W5100 is not initializing though.
Do you have the Arduino connected to the ethernet shield ICSP connector? The ethernet shield schematic indicates that pins 11-13 are not connected. All but the SS (pin 10) are on the ICSP pins. That is the 6 pin connector below the shield.
Edit: This does not apply to all ethernet shields. Some do use pins 11-13. Those usually do not have the 6 pin ICSP connector.
You should be able to connect your Arduino to the shield using pins 11-13 (Uno type boards only. Mega uses different pins) jumped to the appropriate pins on the ethernet shield ICSP connector.
I did look at the schematic but totally missed that. I also read this a million times; not that it helped:
Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header).
Running jumpers from pin 11 on the protoboard to ICSP pin 4, 12 to ICSP 1 and 13 to ICSP 3 has the board working as expected. Dunkirk - I expect this will solve your problem too.