Problems with WIZnet W5100 ethernet shield

Good evening to all.

I state that before writing this post I tried really everywhere and nowhere I found the solution to the problem: ~​​: ~: ~ that occurred with my W5100 ethernet shield. I'm going straight to the point:

I have both an ethernet shield described above, and a module ENC28J60. While the latter are successful almost immediately (but only through the library ethercard) to communicate with the router and take on several projects, with the shield are now more than two weeks that I just can not. Let me explain:

the shield I think it works because all the lights come on, and the built-in SD module works perfectly. The router also (Technicolor TG582n) recognizes the shield also assigning an IP address. Everything seems to work, but to communicate over the network just does not want to know. Just think that there are more than two weeks can not get it to ping.

For now I'm trying to get it started sull'arduino UNO then mount it on the mega.

Below I sketch I use to make the ping test:

#include <EtherCard.h>
	
byte Ethernet::buffer[300];

static byte myMAC[6] = {0x00,0xAA,0xBB,0xCC,0xDE,0x02};
static byte myIPv4[4] = {192,168,1,68};

#define ENC28J60_CS      10

void setup ()
{
   // ....
   // codice di setup del nostro programma
   if (ether.begin(sizeof Ethernet::buffer, myMAC, ENC28J60_CS) == 0)
   {
      // Gestione dell'errore
      // ...
   }
   ether.staticSetup(myIPv4);
}

void loop ()
{
  int PacketLen = ether.packetReceive ();
  if (PacketLen)
      ether.packetLoop (PacketLen);
}

I begin by thanking you for availability

Ferdinand Coletta

P.S. other strange thing is that the page of the router interface the wiznet is a etherport "unknown", as if the router is unable to understand how input is connected (1, 2, 3 or 4)

fikkiovarrikkio:
I state that before writing this post I tried really everywhere and nowhere I found the solution to the problem: ~??: ~: ~ that occurred with my W5100 ethernet shield.

Normally these problem are the other way round. You need the library

#include <Ethernet.h>

to use the W5100. There are standard examples in the IDE

Hello Nick!

I tried to upload all the sketches of the Ethernet library, and the problem is same: not ping!

Try this test sketch. It checks the SPI connection between the Arduino and the w5100. If the serial monitor shows 192.168.2.2, then that part is working. If it shows anything else, like 0.0.0.0, then you have a problem there. Insure the shield is inserted fully into the Arduino.

#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 SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  // Start ethernet
  Serial.println(F("Starting ethernet..."));
  Ethernet.begin(mac, ip);
  digitalWrite(10,HIGH);
  Serial.println(Ethernet.localIP());

  delay(2000);
  Serial.println(F("Ready"));
}

void loop() {
}

The serial monitor give me ip address (in my case 192.168.1.68).So the SPI connection between the Arduino and the w5100 is working ...

OK, if your network has a dhcp server, then try this code to test the w5100 connection to the router. It should also display your localnet settings. If you have any questions about the values returned, post the output of the serial monitor here.

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

byte mac[] = {  0x00, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

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

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Serial.print(F("Starting ethernet..."));
  if(!Ethernet.begin(mac)) Serial.println(F("failed"));
  else {
      Serial.print(F("IP: "));
      Serial.println(Ethernet.localIP());
      Serial.print(F("Subnet: "));
      Serial.println(Ethernet.subnetMask());
      Serial.print(F("Gateway: "));
      Serial.println(Ethernet.gatewayIP());
      Serial.print(F("DNS server: "));
      Serial.println(Ethernet.dnsServerIP());
}

void loop() {
}

Serial monitor said : Starting ethernet...failed

If there is a dhcp server on that network, then you have a problem with the connection from the w5100 to the router. Insure the cable is good and the ethernet interface lights are lit on the shield and the router.

There have been reports of solder bridges on some of the w5100 shields. You should check that also. Read this post and look at the pic links. They show examples of solder bridges.
http://forum.arduino.cc/index.php?topic=124366.msg934591#msg934591

edit: I see your pic of the router's dhcp entries. It appears the router is receiving the dhcp request.

I thimk that you hit the problem!

the cable is good and the ethernet interface lights are lit on the shield and the router, but on the shield some bridge are defective.

so I try to solve the problem and let you know

thanks to the availability

like this http://i681.photobucket.com/albums/vv178/grue2/Computers/pict10852.jpg