DHCP on Ethernet Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wolfhelius
 
Posts: 3
Joined: Thu Feb 24, 2011 12:50 pm

DHCP on Ethernet Shield

Post by wolfhelius »

Hi -

I got ethernet/sdcard board you sell, and on first use it hangs on Ethernet.begin(mac). I'm using example sketch DhcpAddressPrinter with my own device's mac address.

The hang happens on both duemilanove and uno, and happens using a fixed IP, or an unspecified IP, both on a university network and a home network.
Happens with or without a delay(5000) setup. If I specify a fixed IP, it does not hang, but it reports that its own IP is (0,0,0,0), which is not what I gave it!

Looking out over forums, there is a sea of advice on reset pins, watchdog timers, and the like. Some of that seems predicated on having
first generation shields, or older Ethernet library distributions. However, seems like for most people the Ethernet shields just work without issue.
I wonder if you could point me to a pertinent troubleshooting route for this recent (november 2011) version of the shield and the new (1.0) Arduino distribution.

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DHCP on Ethernet Shield

Post by adafruit_support_bill »

Not sure exactly why the conditional compilation isn't working as it should. But for now you can comment out the parts you don't need. This compiles in 022:

Code: Select all

#if (ARDUINO >= 100)
//#include <SoftSerial.h>
//SoftSerial mySerial(2, 3);
#else
// If you're using Arduino IDE v23 or earlier, you'll
// need to install NewSoftSerial
#include <NewSoftSerial.h>
NewSoftSerial mySerial(2, 3);
#endif

User avatar
wolfhelius
 
Posts: 3
Joined: Thu Feb 24, 2011 12:50 pm

Re: DHCP on Ethernet Shield

Post by wolfhelius »

I added the code you posted to my DhcpAddressPrinter (changing SoftSerial to SoftwareSerial) and it compiles fine.
However, I don't totally understand where you're going with it . . . I am getting regular serial comms from the arduino.

I worked a bit more on this. At home, using Verizon router, I specified the gateway IP, the subnet IP, and an open IP,
and I get (1) LAN cable light on the router turns on (2) ethernet shield LINK light flicker, (3) ethernet shield RX light flickers ~once per second
(4) 100M light solid on, (5) L light off, (6) On light solid on.
However, logging into the router itself, the device is not "seen", nor does the arduino report having an IP (it returns (0,0,0,0))
It's conceivable I was using a crossover LAN cable, I'm not sure.

At work, I again specified the gateway IP, the subnet IP, and what I believe is an open IP, and I get the same lights as before,
with the addition of (7) the light just below RX blinking very often, perhaps 4x per second. I cannot log into the router, but
the arduino still reports (0,0,0,0).

BTW I have read there's an issue with this shield working with UNO. I am using a duemilanove for this.

User avatar
wolfhelius
 
Posts: 3
Joined: Thu Feb 24, 2011 12:50 pm

Re: DHCP on Ethernet Shield

Post by wolfhelius »

Problem solved.

-> I had clipped the 2x3 pins that connect to the Arduino's ICSP, because there was a spatial conflict with an Xbee shield. Bad idea! Trying an unadulterated shield, all works as supposed to.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DHCP on Ethernet Shield

Post by adafruit_support_bill »

However, I don't totally understand where you're going with it .
I was wondering what happened to that post. It was intended for a different thread. :?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”