Go Down

Topic: Ethernet Shield is giving me 0.0.0.0 (Read 1 time) previous topic - next topic

korsa

Hi,

I just started with Arduino so forgive me if i'm sounding stupid. Yes, i've been searching for a solution in this forum and on google.

I'm trying to get an IP from my ethernet shield but all i'm getting is 0.0.0.0. The things i've checked so far is:

- Check the MAC address. I got the MAC address from the sticker on the shield.
- Tried different TCP cables.
- Tried running the Arduino with an power adapter instead of the USB cable.

What I think is weird is that when I connect to my router I and check my "device list" I have a device with the ethernet shields MAC address and the static IP that I assigned to it. Could it be the touter?

I'm using Arduino Uno Rev 3 with Ethernet Shield R3 and the code i'm testing is the example code called "WebServer".

SurferTim

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

Are you certain the ICSP connector and pins are connected securely? That would be the MISO pin fail if the w5100 got the ip, but reports the wrong one.

korsa

No, I don't have any SD card inserted.

I thin it's connected correctly? I pushed it as far as I could. The ethernet shield is sticking up a bit but that's because the pins are loonger that the connectors.

korsa

When I took a closer look. I saw that the ICSP connector floats about 2mm above the connector. Almost like the pin rows are a liiitle bit to long. I trimmed the pins down and now the ICSP connector goes all the way down.

Still the same result.

The link led and the RX led are "working" with a yellow/orange light on the shield. 100M and ON is green.

zoomkat

Test code to obtain the assigned IP address. Load the below code, then open the serial monitor to see if an IP address is assigned to the arduino.

Code: [Select]

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

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

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

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

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

void loop() {

}

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

korsa

Thank you for the code. I will test it as soon as i'm done with my other code. I went and bought the WiFi shield and that shield worked right away.

I'll switch back to the ethernet shield a little bit later tonight.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy