ethernet shield not working. Please Help

Hello fans,

I am working on my project with Arduino Uno and Ethernet shield w5100 on it.
my code is just exampe : web server (just changed IP to 192.168.100.120). but if i want to ping arduino it writes "request timed out"
i have connected ethernet shield to pc with crossover ethernet cable and leds on arduino are still on (they do not blink or turn off for a while ...)

I have tried to connect it with straight cable, connect it to the switch and from switch to my pc, to router --> router to switch and switch to pc but nothing worked :frowning:
I did search on the internet and here on forum for 2 months and tried everything but nothing fixed it up...
I also bought 2 more new ethernet shields but they do the same. I did think that my problem can be in my pc so i ping it from another but this did not work either, so i decided to write here

If anyone can help me or have any ideas what to do please write me :slight_smile:

Thank you

test only connected to router. update the Ethetnet library to the latest version 2.00 published last month and try the WebClient example

Hello friend @Juraj
I tried all what have you told me to do but it did not work :confused: ...
I also tried code for arduino, that arduino will get IP from DHCP but that also didn't work

Ivo_Creamo_Durec:
Hello friend @Juraj
I tried all what have you told me to do but it did not work :confused: ...
I also tried code for arduino, that arduino will get IP from DHCP but that also didn't work

details about "doesn't work"? what is in Serial Monitor?

Ivo_Creamo_Durec:
Hello fans,

I am working on my project with Arduino Uno and Ethernet shield w5100 on it.
my code is just exampe : web server (just changed IP to 192.168.100.120). but if i want to ping arduino it writes "request timed out"
i have connected ethernet shield to pc with crossover ethernet cable and leds on arduino are still on (they do not blink or turn off for a while ...)

I have tried to connect it with straight cable, connect it to the switch and from switch to my pc, to router --> router to switch and switch to pc but nothing worked :frowning:
I did search on the internet and here on forum for 2 months and tried everything but nothing fixed it up...
I also bought 2 more new ethernet shields but they do the same. I did think that my problem can be in my pc so i ping it from another but this did not work either, so i decided to write here

If anyone can help me or have any ideas what to do please write me :slight_smile:

Thank you

maybe 511 resistor problem Solve problem with “511” at W5100 Ethernet shield – "Arduino tehNiq"

Juraj:
details about "doesn't work"? what is in Serial Monitor?

on serial monitor is always : "Failed to configure Ethernet using DHCP"

I tried this code :

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

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = {  
  0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
// Initialize the Ethernet client library
// with the IP address and port of the server 
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;

void setup() {
  // start the serial library:
  Serial.begin(9600);
  // start the Ethernet connection:
  Ethernet.begin(mac);
}

void loop() {
   if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
   }
   
   else {
           Serial.println("Assigned IP Address is :  ");
           Serial.println(Ethernet.localIP());
        }
        delay(2000);
}

ieee488:
maybe 511 resistor problem Solve problem with “511” at W5100 Ethernet shield – "Arduino tehNiq"

Hello :slight_smile: thanks for the tip ... but i think it isn't this problem because i have tried two more new ethernet shields and they did not work too

I do not know :confused: should they all have the same problem even when they are new ?

Try this test sketch. If the serial monitor doesn't display 192.168.0.2, you have a SPI bus problem.

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

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,0,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() {
}

SurferTim:
Try this test sketch. If the serial monitor doesn't display 192.168.0.2, you have a SPI bus problem.

OMG

It is true ! wow thank you @SurferTim
serial monitor output : "Starting w5100" and then under it "0.0.0.0"
so problem is here... now, please tell me how to fix it please :slight_smile:

There could be a couple reasons.

Are you certain it is a w5100 controller? If not, and you are using a w5100 library, that would give you that result.

Check the ICSP pins to ensure you have a good connection. The pins must insert completely into the socket, and no bad or cold solder joints.

this is my chip I am using, exactly the same. (attachment)
all pins are looking good ...

that problem started like I was pinging arduino IP Address with cmd and command "ping 192.168.1.120
-t" so it ping forever ...
and it was working good ... arduino was responding, but i don't know why it stopped and it changed to "host unreachable". I then tried to fix it, but I think i just did it worse because it started (cmd) printing "request timed out"

sorry for my english

ethernet-shield-w5100-arduio.jpg

@SurferTim, the latest update of the Ethernet library supports W5100, W5200 and W5500 with automatic detection

@Juraj, I never presume they are using the latest library.

so ...
do you have any idea how to fix that problem ?
or if you want to know something about it to let you help figure it out just ask and i will try to help as much as i can :slight_smile:
at last, it is me who want to fix it

did you try the examples of the recent version of the Ethernet library?

Juraj:
did you try the examples of the recent version of the Ethernet library?

I did ...

for example : Web Server code (ethernet example) serial monitor output was : "server is at 0.0.0.0"

all my libraries are updated (ethernet is on 1.1.2) so ... i dont know :confused:

the recent Ethernet library is 2.00

oh ...

i updated them via Sketch > include library > manage libraries
I will try it

no my friend :confused: it didn't work

led that are still on : FULLD, 100M,LINK and of course PWR
COLL, RX and TX blinks just for a few seconds after powering up the arduino but after a few seconds are turned off and never even blink again ...

I guess that means something, but i am newbie and do not know much about it

is the shield connected to router?
what does it print to Serial Monitor?