Ethernet Shield Not taking address

sbavington:
Thanks for the fast response.

I think you're right but there is only the Arduino and the Ethernet Shield as shown.

...

(3283.46 KB, 3648x2736 - viewed 6 times.)

Go easy on these 3 megabyte photos please. That takes a while to download, and then is too big to view in the web browser. A quick resize in your photo program will save everyone some effort.

I see from your photo that the shield does not appear to be plugged in properly. Those pins normally slide all the way into the sockets underneath. It looks to me like that are just touching. Maybe it has extra long pins, but you might want to check that by firmly pushing down on it.

Sorry about the picture. No problem to shrink.

As for the pins, they bottom out, but the pins on the Adurino seem shorter.

I cut 1/8" off all the pins and guess what?

server is at 10.10.0.177
new client
GET / HTTP/1.1
Host: 10.10.0.177
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

client disonnected
new client
GET /favicon.ico HTTP/1.1
Host: 10.10.0.177
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: /
Referer: http://10.10.0.177/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

client disonnected
new client
GET / HTTP/1.1
Host: 10.10.0.177
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Referer: http://10.10.0.177/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

client disonnected
new client
GET / HTTP/1.1
Host: 10.10.0.177
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Referer: http://10.10.0.177/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

client disonnected
new client
GET / HTTP/1.1
Host: 10.10.0.177
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Referer: http://10.10.0.177/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

client disonnected

Are you saying it's working now?

Yes, it appears to be working. I'm watching asa the simple web server gives me the pin states and it's logging th client in and out for 10 minutes now.

I guess the pins were too long and prevented the shorter pins on the Adruino from making.

Good catch!

Thanks so much for the help.

Gentlemen, I had the same problem and the solution was the same: cut the terminals.

Thanks Nick, for the solution ...

I had won so few white hairs. :cold_sweat:

i have a problem, my eth shield appears to be functioning(orange link light, and flickering green traffic light) but i cannot ping it, nor am i getting ANYTHING at all in the serial window. my pins are the correct length(didnt have to trim them) as the shield pins bottom out on the mega2560.

i think my router may be trying to assign an IP, but i am manually setting the IP in the sketch.... how do i avoid this? is there a way to set the shield to accept an IP from the router?

Regards
Jason

You can use DHCP to assign the network settings.

  Serial.print("Starting ethernet...");
  if(!Ethernet.begin(mac)) Serial.println("failed");
  else Serial.println(Ethernet.localIP());

Does it print a valid IP? Or does it fail after a couple minutes? Or does it freeze forever?
Posting your code may help.

i think my router may be trying to assign an IP, but i am manually setting the IP in the sketch.... how do i avoid this?

Configure your router properly. Tell it that the Arduino is at xxx.xxx.xxx.xxx, and that it should not assign that address to any other device.

is there a way to set the shield to accept an IP from the router?

Yes.

i've resolved a problem with a mega 2560 and shield W5100.
the ethernet was detected but The problem was serial port which was returning adress IP 0.0.0.0 .
The problem was the pins were too long and the contact between mega and shield wasn't correct for the ICSP connector

So just cut 2 millimeters to all of the shield W5100 pins to make sure the ICSP connection is well done
between the 2 devices . Just after, an IP adress was available on the serial port monitor .

gilles2956:
i've resolved a problem with a mega 2560 and shield W5100.
the ethernet was detected but The problem was serial port which was returning adress IP 0.0.0.0 .
The problem was the pins were too long and the contact between mega and shield wasn't correct for the ICSP connector

So just cut 2 millimeters to all of the shield W5100 pins to make sure the ICSP connection is well done
between the 2 devices . Just after, an IP adress was available on the serial port monitor .

Hi, sorry to revive a post so old. I have a similar problem, rather than get out the ip 0.0.0.0 (which would indicate that there is a good connection on the pins ICSP), I get an ip 255.255.255.255.

Take the W5100 chip and is bought on ebay (11 €).

I have read it can be a faulty chip, but before returning to hong kong I wonder if there is any solution.

Thank you.
A greeting

If you are using bad code, then you might want to fix it.

hey guys ive got similar problems. I cant get anything working. Lan shows address 0.0.0.0 via debug serial as a host and the sd library gives me no information about the sd card. I am using an arduino mega an an aliexpress lan shield (the normal cheap design). Using ide 1.0.5 with its built in libraries.

The chip is also getting very hot, but as far as i read this is okay. I also tried to connect the wires on my own with jumpers. (spi header, 3.3v, reset, pin 0-4, 10, aref). no success. I also tried an extern power supply with these breadboard adapters and usb. 3.3v and 5.v.

Is there an easy way to somehow get a respond, a "hello world" from the shield? Ive no idea if my lan hub or my sd card might cause errors. I just have no feedback at all, seems the board is dead?

I am using an arduino mega an an aliexpress lan shield (the normal cheap design).

Please provide a link to that product or make at least a photo of your shield. From the description I get the impression that you own a shield with another chip than the WizNet5100 of an original Arduino Ethernet shield.

my lan cable was broken, it shorted some pins and i think it killed the wiznet chip. the next shield was broken too since i noticed lan errors on my laptop. luckly my laptop is more stable...

Hi,

I have the same ethernet shield that shows on the picture of sbavington and combined it with an Arduino mega 2560 using IDE 1.0.6. I tried all the stuff that I found on the internet but nothing seems to get that ethernet shield working.
The strange thing is that when I set a static ip-address, ping gives an immediate response. However, when the statement Ethernet.localIP() returns always 0.0.0.0
When I use a dynamic IP address, the code seems to crash when Ethernet.begin(mac) because there is no serial output anymore after that statement.

Before cutting those pins as this seems to be a solution for other people, I just want to mention that the ISCP connecter is all the way over the mega pins, so I wonder whether cutting them makes sense (as I'm still in guarantee).

Thanks,
David

Do you have a SD card in the shield's slot?

edit: If that is not the problem, I have a test to determine which side of the SPI bus has the MISO line locked up. That is apparently the problem in your case if the w5100 is getting a static assignment and responds to a ping, but reports 0.0.0.0 as the ip.

If you have a resistor somewhere between 2K and 5K, connect it between D50 and 5v with the ethernet shield disconnected, then run the static IP assignment sketch. If the sketch reports the IP as 255.255.255.255, then the Arduino MISO line is not the problem. If it reports 0.0.0.0, then the problem is on the Arduino, not the ethernet shield

Then connect the ethernet shield again, and connect the same resistor between D50 and 5v. If the sketch reports the ip as 0.0.0.0, then the problem is on the ethernet shield. If it reports 255.255.255.255, then something is wrong with the w5100 MISO line.

i got the same shield and got issue with not taking any address.
The problem was in connection LAN cable to switch - the result is no address
When is LAN cable connected to router all is OK

nonsmoker:
i got the same shield and got issue with not taking any address.
The problem was in connection LAN cable to switch - the result is no address
When is LAN cable connected to router all is OK

Only using DHCP to obtain network settings (edit: and only a few models of switches). If you are assigning a static IP, no ethernet cable is required. My Linksys and Netgear switches don't present a problem with DHCP.

I HAVE PROBLEM REGARDING THE OUTPUT OF ETHERNET SHIELD, FOR ANY INPUT ADDRESS I AM GETTING THE SAME OUTPUT LIKE 0.0.0.0 ON THE SERIAL OUTPUT OF ARDUINO .

MY PROGRAM IS:

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
}

void loop() {
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Serial.println("new client");
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close"); // the connection will be closed after completion of the response
client.println("Refresh: 5"); // refresh the page automatically every 5 sec
client.println();
client.println("");
client.println("");
// output the value of each analog input pin
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
int sensorReading = analogRead(analogChannel);
client.print("analog input ");
client.print(analogChannel);
client.print(" is ");
client.print(sensorReading);
client.println("
");
}
client.println("");
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println("client disconnected");
}
}

I have had two of these shields, from different EBAY sellers - some months apart. One refused to allow the arduino board to boot at all and proved to be a solder bridge between the reset pin on the ICP 6 pin plug and the SD card frame - careful use of a craft knife solved that.

However BOTH boards have proved to be reluctant to reset properly - it turns out that the reset line into the W5100 is not connected to anything. If you trace the track it goes to a pad near the reset switch, but no further. I suspect that there may have been an RC network on those pads to the reset line that has been removed for some reason. If you run a wire from that pad to a spare IO pin on the arduino you can have absolute control of the reset of the W5100 and it starts reliably.

I know you get what you pay for - these boards just don't seem to be tested at all - but those of us on a limited budget dot have a lot of choice.

YMMV
Dave