How to debug W5100

Hi,
I layouted a board with 2560 and W5100 according the arduino.

but now it does not work,

would you give some tips about how to debug it.

I can not find any problem from schematic as follows.

I thing when I connect it to the router the link will be builded

lind and speed led will be on just like the original board. but now the board no response.

Help me please.thanks very much

Thanks

I found the problem. C16 and C17 should connect to 3.3V.

I changed the RJ45, so I did not pay enough attention on it.

Now my software still can not be used in the new board.

here is the code which developped by a friend from this forum.
my serial show this

Starting ethernet...
192.168.1.111
Ready
connecting...failed
Fail 1
connecting...failed
Fail 2
connecting...failed
Fail 3
connecting...connected

Timeout

disconnecting.
Pass 4
connecting...failed
Fail 5
connecting...failed
Fail 6
connecting...failed
Fail 7
connecting...connected

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

// this must be unique
byte mac[] = { 
  0x90, 0xA2, 0xDA, 0x0F, 0x1A, 0x8D};
// change to your network settings
IPAddress ip(192,168,1,111);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);

// change to your server
IPAddress server(74,125,227,16); // Google
IPAddress Myserver(192,168,1,101); // My
//Change to your domain name for virtual servers
char serverName[] = "www.google.com";
char MyserverName[] = "www.yidihan.com";
// If no domain name, use the ip address above
// char serverName[] = "74.125.227.16";

// change to your server's port
int serverPort = 80;

EthernetClient client;
int totalCount = 0;
char Filename[]="/cat_2_7.xml";
// set this to the number of milliseconds delay
// this is 30 seconds
#define delayMillis 30000UL

unsigned long thisMillis = 0;
unsigned long lastMillis = 0;

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

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

  // Start ethernet
  Serial.println(F("Starting ethernet..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);

  // If using dhcp, comment out the line above 
  // and uncomment the next 2 lines

  // if(!Ethernet.begin(mac)) Serial.println(F("failed"));
  // else Serial.println(F("ok"));
  digitalWrite(10,HIGH);

  Serial.println(Ethernet.localIP());

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

void loop()
{
  thisMillis = millis();

  if(thisMillis - lastMillis > delayMillis)
  {
    lastMillis = thisMillis;

    if(!getPage(Myserver,serverPort,Filename))
    Serial.print(F("Fail "));
    else Serial.print(F("Pass "));
    totalCount++;
    Serial.println(totalCount,DEC);
  }    
}

byte getPage(IPAddress ipBuf,int thisPort, char *page)
{
  int inChar;
  char outBuf[128];

  Serial.print(F("connecting..."));

  if(client.connect(ipBuf,thisPort))
  {
    Serial.println(F("connected"));

    sprintf(outBuf,"GET %s HTTP/1.1",page);
    client.println(outBuf);
    sprintf(outBuf,"Host: %s",MyserverName);
    client.println(outBuf);
    client.println(F("Connection: close\r\n"));
  } 
  else
  {
    Serial.println(F("failed"));
    return 0;
  }

  // connectLoop controls the hardware fail timeout
  int connectLoop = 0;

  while(client.connected())
  {
    while(client.available())
    {
      inChar = client.read();
      Serial.write(inChar);
      // set connectLoop to zero if a packet arrives
      connectLoop = 0;
    }

    connectLoop++;

    // if more than 10000 milliseconds since the last packet
    if(connectLoop > 10000)
    {
      // then close the connection from this end.
      Serial.println();
      Serial.println(F("Timeout"));
      client.stop();
    }
    // this is a delay for the connectLoop timing
    delay(1);
  }

  Serial.println();

  Serial.println(F("disconnecting."));
  // close client end
  client.stop();

  return 1;
}

Arnold_Sweden:
Thanks

You're welcome!

it still does not work...

Have you tried that server with another computer on the localnet? The main issue with servers is the server firewall. Are you letting port 80 through the server firewall?

Thank you,
I try the same code on the arduino 2560 + ethernet. It works, the sever just on my laptop.
keep everything same and change into my new board.
it does not work.

Then you still have a hardware problem somewhere. I would guess between the w5100 and the ethernet connector.

Can you ping the Arduino IP from the server?

I am afraid you are right.

ping command does not work.

The link led on the board is always flashing.

And I made a mistake, I did not use transformer.

Could you please give me some tips about how to locate the hardware problem.

thanks a lot.

but some times it happens like this image.
left is serial and right is the log of server.

3.png

It appears to make a connection now and then, but never downloads anything.

Have you compared your schematic with the ethernet shield?

I have checked my schematic, all of them are same except the Rj45.

I used Rj45 without a transformer. So there is no transformer center tap which should be connected to 3.3

It does not work at first . Now I pull up the the center of the R+ and R-, T+ and T- to 3.3V

It seems work, the speed and link led have response.

maybe it is the source of problem. does it matter?

The Wiznet website shows a transformer between the w5100 and the RJ45 connector. I presume the transformer is required.

Thank you very much.

I will do work on it.

Hi, I changed the RJ45 into RB1-125BHQ1A which is the same with arduino ethernet shield.
It works well. It appears it does not work without transformer.
thanks very much

Arnold_Sweden:
Hi, I changed the RJ45 into RB1-125BHQ1A which is the same with arduino ethernet shield.
It works well. It appears it does not work without transformer.
thanks very much

I'm trying something very similar and I think I am also facing a problem with the connector. Arnold_Sweden, could you please let me know where you got the RB1-125BHQ1A from/where you bought it? I can only find B2B sites selling it and it would be great to get one from somewhere and see if that is the problem I'm stuck on.