[SOLVED] Arduino Uno R2 and Wiznet 5100. DHCP does not work.

Hello,

I have an official Arduino Uno R2 and a Wiznet 5100 shield from Hanrun (HR911105A 10/50). I want to connect the Arduino to a server of my own, but first i want to test DHCP or static ip configuration. And that's what does not work.

I first tried all the examples on the official library. None of them work for me. For example when I upload the DhcpAdressPrinter sketch i get this result on the Serial Monitor:
Failed to configure Ethernet using DHCP

I also tried to set up ip manually (using Ethernet.begin(mac,ip,gw,network)) but i get the same result.

My network configuration is 172.16.1.1 (for DNS, gw and DHCP ) and 172.16.255.255 network. The network is working (connecting a PC works).

I tried this solution: http://arduino.cc/forum/index.php/topic,114206.0.html
But I get this result:

connection failed

disconnecting.

Am I missing something? What can I do to get it work?

Thank you.

More information:

The LEDs Full Dúplex, 100M and Link are on. Rx and Tx leds are always off.

Try this sketch. It tests the SPI connection from the Arduino to the shield.

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,2,2);

void setup() {
  Serial.begin(9600);

  // disable SD card if one in the slot
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Serial.println("Starting w5100");
  Ethernet.begin(mac,ip);

  Serial.println(Ethernet.localIP());
}

void loop() {
}

If the serial monitor displays 192.168.2.2, then that part works. If it displays any other value, like 0.0.0.0, then the SPI connection failed.

Thank you very much, I really appreciate your help. It was only that one of the SPI pins was not welded correctly.

David' issue may have been resolved, but I have the same problem and still cannot connect via my Arduino + Ethernet shield.
In my case I have a Rev3 Uno board and am using 1.0.3. When I run the sample sketch above, I receive the ethernet address of 0.0.0.0
The Uno and Ethernet boards were purchased this week from Radio Shack, the ethernet shield has a mac address on a sticker.

I verified conductivity of all pins between the ehternet shield and the Ardiuno Uno board - all check out OK.

I am on a home network with a linksys router with DHCP enabled and working for the PC's on the network.

When I plug in a raspberry pi to the same network, it immediately gets an IP address assigned to it via DHCP and is able to browse the internet.

I have tried all of the ethernet examples inside of the Arduino 1.0.3 download - and they all either hang and/or report the 0.0.0.0 "ip address" - any other suggestions?

Thanks.

@kquinn: Did you check the ICSP pins and connector? That is the connections for the SPI bus. Are all 6 pins connected properly?

I almost missed your post because this thread is marked [SOLVED]. Maybe you should start a new thread.

I have the same problem as david but after giving me the IP address for SPI when I tried another exemple such as DHCPaddressPrint it gave me this Failed to configure Ethernet using DHCP
what can I do for the connection I am using 3g USB modem Thanks