Ehternet shield not responding

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
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Ehternet shield not responding

Post by johnglen »

Just got the Ethernet / SD card shield - Adafruit PN 201 - cut and pasted the sketch / code from the Webserver tutorial, but no joy. From the Windows Troubleshooter - "Your computer appears to be correctly configured, but the device or resource (192.168.1.1) is not responding."

A few specific questions:
1) I don't see specific directions on this, but I'm assuming that since the Server is being set for Port 80, that I can use my browser (normally Chrome, but I'm also using IE) and direct it to IP address 192.168.1.1 (I adjusted the IP Address in the sketch). Perhaps I'm mistaken about this?

2) The RX light is blinking, but the TX light is not blinking, so I guess I'm receiving but not transmitting? The Link light is also blinking at the same time as the RX light.

3) There is a light identified as "L", just above the "RX" light - that light has a very faint/ dim glow - on all the time, not blinking. I don't see what this light is supposed to be.

All suggestions would be appreciated.

Thank you!
John

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

Re: Ehternet shield not responding

Post by adafruit_support_bill »

You should be able to use any browser. They all default to port 80.
Not sure about the 'L' led. Which version of the shield do you have? A photo would be helpful.

If you connect the Serial Monitor and view the diagnostic output, does startup() complete without errors?

User avatar
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Re: Ehternet shield not responding

Post by johnglen »

The "L" light is on the Ethernet shield - see attached photo. I can't seem to find any documentation which indicates the purpose of this light. Here's the behavior.
- When connecting the USB cable to power up the shield, the L light flashes brightly several times,
- Then it becomes dim, as shown. This dimness can be compared to the brightness of the "ON" light close by the "L" light (which I would consider normal brightness)

Regarding the "startup()" function. I get nothing in the Serial Monitor. I have started to add some Serial printing to try to figure out where I am in the program, so I can get printing, but without the additional lines, there is nothing in the Serial Monitor.

NOTE: I am using the code found on this page - http://arduino.cc/en/Tutorial/WebServer - i bought this shield on the Adafruit site last week, but I can't find a specific sketch for the sheid on the Adafruit site.

Thank you in advance for your help.

John G
Attachments
Ethernet shield - Lights.jpg
Ethernet shield - Lights.jpg (272.71 KiB) Viewed 2485 times

stephanie
 
Posts: 295
Joined: Sat Dec 11, 2010 1:17 am

Re: Ehternet shield not responding

Post by stephanie »

I believe the L light is just the Arduino standard pin-13 led. It blinks a bit at startup as part of the bootloader operation.

After that, it would appear dim or flickery as pin 13 is used in the SPI interface to tale to the ethernet shield.

User avatar
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Re: Ehternet shield not responding

Post by johnglen »

Thanks for that - I don't think that the "L" light is the issue but it seemed unusual.

As indicated in my initial posting, my problem is that I can't seem to get the server running. I've followed the procedure on the http://arduino.cc/en/Tutorial/WebServer page but no joy. I've added some Serial.print comments to the sketch to indicate the internal program status and it would appear that the problem is this line:

EthernetClient client = server.available();

No matter what I do, the "client" value remains 0.

What I am doing is this:
1) i have my laptop plugged into the shield serial port using an Ethernet cable.
2) I enter the specified IP address into the browser - 192.168.1.177 - and try to contact that website.
3) I see the RX and LINK lights blinking but the client value never changes from zero.

Quite frankly, the statement is not terribly clear to me. It would appear that this statement is running the server.available() function, looking for an available server. But the confusing thing is that I'm trying to run a server, and looking for an available client. However, when I change to "EthernetServer client = client.available();", the compiler is not happy with that formulation.

Any suggestions????

Thanks!!

User avatar
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Re: Ehternet shield not responding

Post by johnglen »

CORRECTION - "1) i have my laptop plugged into the shield ETHERNET port using an Ethernet cable."

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Ehternet shield not responding

Post by pburgess »

Hi John,

You mentioned changing the IP address in the sketch to 192.168.1.1. On a lot of networks, that's usually the router address (or sometimes 192.168.0.1). You can find out for sure by typing 'ipconfig' from the Windows command prompt, and then rummage through the output looking for the "Default Gateway" line. Odds are that it'll be one of those two addresses. Using that as a start, change the sketch to use that, replacing the last number (1) with the 177 from the original sketch (can't guarantee 100% this will work, but in all likelihood your router will be using lower values as it hands out addresses...only way to be sure is to get into the router config). Compile, upload to board, and then enter the same sequence in the address bar of the browser, see if that works.

User avatar
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Re: Ehternet shield not responding

Post by johnglen »

Thanks for that - evidently great minds think alike....

I've reloaded / recrafted the sketch from the "example" code quite a few times, and last night I used the code with the IP address as written (192.168.1.177). I also found some references on line to changing the Port address, so I changed that to 8080 and then tried to load "192.168.1.177:8080" in my browser, using both Chrome and IE. Still no joy.

I did add some Serial.print lines to the sketch, and tried printing out the "client" value after the line "EthernetClient client = server.available();" and then watched that on my monitor. I also added delay(100) after printing so that the numbers didn't run so fast on the monitor. Unfortunately, when I tried hitting the shield with my browser - by typing in 192.168.1.177:8080 into the search line in the browser - the "client" value did not change - it remained zero.

You mention the "router". For the most part, I'm not using a router / hub / switch. For most of my testing, I am running the Ethernet cable directly out of my computer, directly to the shield - 1 cable / 2 ends. I did a couple attempts with the shield hooked up to the modem / hub /router unit - the connection LED lit up on the router, but that seemed to have even less RX light action than when hooked directly to the computer. Just to be sure that there was no confusion with my home network, I was running this with the Wifi antenna switch turned off.

I'm thinking that somehow I have to get the server.available() function to work correctly. Is there any utilty which would for sure send out code that the shield is looking for? Also, I'm still a bit confused by using the "server.available()" function. My goal is to have the micro / shield function as the server, not the client. I keep thinking that the software should be running the "client.available()" function, since it is looking for clients, not servers. But the compiler just doesn't like that idea.

Finally, just to make sure that I'm going about this the right way, the purpose of my current project - the reason I bought the shield - is to use my browser as a means of monitoring the analog / digital inputs on the micro. I know I can do this using the serial monitor, but it would be way more helpful to do this using a browser.... I'm using the code found in "C:\Program Files\arduino-1.0\libraries\Ethernet\examples\WebServer" Hopefully, that's all good.

Thanks in advance for your help.

John

User avatar
johnglen
 
Posts: 8
Joined: Tue Jan 31, 2012 12:16 am

Re: Ehternet shield not responding

Post by johnglen »

EUREKA...!! Found it.

For some reason, my hub doesn't let 192.168.1.x traffic pass.... It's setup for 192.168.100.1. I changed the IP Address to 192.168.100.117 and voila! All is well.

Thanks for the help....

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

Return to “Arduino Shields from Adafruit”