Go Down

Topic: Ethernet Shield cannot connect (Read 2061 times) previous topic - next topic

SurferTim

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

marlar


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


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

SurferTim

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.
Code: [Select]
#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() {
}


marlar

Hmmm, it does print "Starting w5100 192.168.2.2"

What does that tell you?

SurferTim

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.

marlar

#20
Jan 15, 2013, 11:05 pm Last Edit: Jan 15, 2013, 11:18 pm by marlar Reason: 1
Hmmm, it is only about half the times it echoes back the local ip. So the board most be broken.

aussie_wombat

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

marlar


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.

JohnHoward

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.

SurferTim

Quote
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.



marlar

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.

Go Up