Ethernet Shield cannot connect

PaulS:

The shield is connected to the router.

Does the router know about the Arduino? Can you ping the Arduino?

No to both.

As mentioned in #0, the weird thing is that I actually twice did get a succesful connection out of now perhaps 200 attemtps.

No to both.

Can you configure the router to tell it that the Arduino exists, at a specific IP address that it is not to use for any other device on the network?

the weird thing is that I actually twice did get a succesful connection out of now perhaps 200 attemtps.

If some device was connected that was assigned 10.0.0.9 by the router, and then that device was disconnected, the router would then route requests to/from the Arduino correctly for a while.

The router has to understand about the Arduino so that it can route packets to it, including ping requests. The Arduino won't be able to connect until the router knows it exists, and that it should accept packets from it and route packets to it.

I have tried to assign 10.0.0.15 which is not in use to the current MAC address of the Arduino to no avail. I also tried changing the MAC address to the same value as my PC but there was no light in the COLL lamp.

I did something else for a test. I connected the shield directly to the LAN connector on my PC. It still didn't work but at least my PC sees that it is connected to a network. If I unplug it, the notification icon in the tray will show that it is not connected.

Is there are any command I can run on the Linux box to check if the specific MAC address is present on the network?

Now I suddenly make it obtain an IP from DHCP. But only one time, it's back to "normal" again.

I also tried changing the MAC address to the same value as my PC but there was no light in the COLL lamp.

Never do that. It will cause a fail. Like ip addresses, the mac addresses on the localnet must be unique. Otherwise it will not be able to connect to anything.

SurferTim:
Never do that. It will cause a fail. Like ip addresses, the mac addresses on the localnet must be unique. Otherwise it will not be able to connect to anything.

Sure, but you didn't get the point! I deliberately assigned the same mac address and would have expected the collision warning lamp to light up. It didn't, which tells me "something is rotten" :slight_smile:

Do you have a microSD card in the SD slot on the shield? If so, remove it and test it again. You might need to power down the Arduino for a few seconds to clear any faulty settings from the devices.

No SD card present. Powering down does not help.

If all the pins are connected correctly (check the ICSP pins closely to insure a connection), then you have a bad ethernet shield. :frowning:

SurferTim:
If all the pins are connected correctly (check the ICSP pins closely to insure a connection), then you have a bad ethernet shield. :frowning:

That is also my conclusion. Is it possible to send some ICSP commands to the shield to test it?

Here is my test. Upload this code. If the serial monitor shows 192.168.2.2, then you are ok on the SPI and the Arduino end of the w5100. If it returns anything else, like 0.0.0.0, then it failed.

#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 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() {
}

Hmmm, it does print "Starting w5100 192.168.2.2"

What does that tell you?

That tells me that the SPI and the Arduino side of the w5100 is working. If it is still failing, it must be something on the ethernet/network end.

Hmmm, it is only about half the times it echoes back the local ip. So the board most be broken.

Hi all,

Could it be a power issue.

I found that running my etherten with one Freetronics DMD panel was ok, but the ip would drop out, after one udp request decoding. I was running from usb power. Once I provided a proper powerpack then the ip did not drop out anymore...Maybe this could be your problem.

Regards Aussie_Wombat

aussie_wombat:
Could it be a power issue.

I found that running my etherten with one Freetronics DMD panel was ok, but the ip would drop out, after one udp request decoding. I was running from usb power. Once I provided a proper powerpack then the ip did not drop out anymore...Maybe this could be your problem.

That was a very good suggestion and I really hoped the power issue could be the culprit. Because my Raspberry Pi behaved strange until I found that the power supply was a bit too meager. After I exchanged it with a better one, it worked well.

But alas, in this case it didn't help. I connected a capable 9V switch mode supply and measured 4.98V on the 5V pins but still, the shield cannot operate. It must be defective.

Since 10.0.0.0 is the reserved Class A private subnet, I would expect your router and linux box configured themselves with the default mask 255.0.0.0 unless you actually set it to 255.255.255.0

You can use the arp command to find out whether the other devices 'see' the ip/MAC for your shield.

And WireShark can be invaluable as a tool to watch the actual traffic over your ethernet segment. Download it from wireshark.org. I keep an old laptop around with it installed for whenever I have such connectivity issues.

Since 10.0.0.0 is the reserved Class A private subnet, I would expect your router and linux box configured themselves with the default mask 255.0.0.0 unless you actually set it to 255.255.255.0

That is not correct for the ethernet shield. If you specify just the ip, it builds the rest as a class c network. If you use 10.0.0.2 as the ip, it will use
255.255.255.0 as the subnet mask.
10.0.0.1 as the gateway and dns server.

My system uses 10.0.0.1 for gateway and DNS, and 255.255.255 as subnet mask. Anyway, I have also tried to set these values manually in the sketch to no avail.