Pages: 1 [2]   Go Down
Author Topic: Ethernet Shield cannot connect  (Read 1860 times)
0 Members and 1 Guest are viewing this topic.
Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6013
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6013
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm, it does print "Starting w5100 192.168.2.2"

What does that tell you?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6013
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm, it is only about half the times it echoes back the local ip. So the board most be broken.
« Last Edit: January 15, 2013, 05:18:50 pm by marlar » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Full Member
***
Karma: 5
Posts: 219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6013
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 [2]   Go Up
Jump to: