Go Down

Topic: webserver do not respond (Read 4668 times) previous topic - next topic


I'm using Arduino Uno for the first time with Ethernet Shield (W5100 chip).
I connect it via RJ45 patch cable to my Netgear DNG3500 router, I've used Webserver sketch from examples, I modified IP address using within my local network range and uploaded it.
I tested that network data are correct becouse if I ping it answer correctly in less than 1ms.
When I go to my web browser and connect to non page was found :(

I tried to use IE8, Firefox and Chrome web browser... unsuccesfully.
I tried to change my router, I used a simple switch, I used a different PC, I changed data cable... but unsuccesfully.
I tried to use IDE 1.0 and IDE 0023... but unsuccesfully.

Only one time it works... for few seconds.

Anyone can help me?


When I go to my web browser and connect to non page was found

That would indicate a problem with the code running on the Arduino. And that code looks like?
The art of getting good answers lies in asking good questions.


The code is the sample in Tools > Ethernet > Webserver  ...what is wrong???

  Web Server

A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.

* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)

created 18 Dec 2009
by David A. Mellis
modified 4 Sep 2010
by Tom Igoe


#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,0,177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup()
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);

void loop()
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(" is ");
            client.println("<br />");
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
    // give the web browser time to receive the data
    // close the connection:



I have exactly the same problem. I bought the arduino Ethernet on Sunday, yesterday I tried the webserver example and was working perfectly, today was also working, but suddenly it does not work anymore....

the code is the webserver example code.

Thanks in advance!


Does anybody know? I wouldn't like to give it back or buy a new one... :(


What exactly is the error? Is it "error 404 page not found" or "cannot connect to server"?


You must ensure that the reset pin is not connected to the Arduino board (best to bend the pin side) and then it goes.


When I go to it says "waiting", it takes a lot of time and at the end it tells me that cannot connect.

In mi case it is the Arduino Ethernet (I don have the shield, it is everything integrated).

It is so strange... it was working perfectly and suddenly does not work....  :(


Are you certain about the ip address you entered in the web server code?
What is the ip of the computer you are attempting to connect with?
Can you ping the ethernet shield ip address from the computer?


Are you certain about the ip address you entered in the web server code?

Yes, it is the same that appears in the ethernet web server example.

What is the ip of the computer you are attempting to connect with?

Can you ping the ethernet shield ip address from the computer?

Yes, indeed the leds Tx and Rx are blinking in the ping. Also when I go to chrome and type the IP address Tx and Rx blink once.
Before this error happened, I could also connect from my mobile phone via WIFI and now it is not possible, remains waiting and waiting....


Guys! Now it works!

What I have done is to install the program in another computer (laptop windows), upload again the webserver example... and works!

In the other computer I was working with Linux..... Linux (Ubuntu 11) seems to be the reason, but in the first tests was working perfectly. Strange....

Thanks a lot for the help!


Glad to hear that. I do not believe it is Ubuntu tho. I am using a Mega with V11.10, and it is working great with the ethernet shield.

I did have some trouble with the shield before I disabled the microSD card reader SPI interface on the shield. It would interfere with the w5100 IC on occasion.



I have the same problem :( but it is not solved yet. I inserted a SD card in the slot. That is when the problem started. My serial output showed ip as and later when i removed the SD card, it is showing the ip from the code. But still i am not able to connect to the webserver.

How to disable the SD card?

Move high to Pin 4????


Post your code. The below is a fix.

Code: [Select]


  // disable w5100 while setting up SD
  Serial.print("Starting SD..");
  if(!SD.begin(4)) Serial.println("failed");
  else Serial.println("ok");

  Ethernet.begin(mac, ip, gateway, gateway, subnet);
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


I am facing the same problem with the same code and can't change my machine[laptop]
Code is :
#include <Ethernet.h>
#include <SPI.h>
byte mac[] = {0xDE ,0xAD ,0xBE,0xEF ,0xFE,0xED};
IPAddress ip(192,168,1,177);

EthernetServer server(80);

void setup()
  while (!Serial) ;
  Serial.print("server is at :");
  pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

void loop()
  EthernetClient client = server.available();
    Serial.println("new client");
    boolean clib = true;
        char c = client.read();
        if ( c=='\n' && clib)
          client.println(F("HTTP/1.0 200 OK"));
          client.println(F("Content-Type: text/html"));
          client.println(F("Connection: close"));
          client.println(F("Refresh: 5"));
          client.println(F("<!DOCTYPE HTML>"));
          int sensorReading = analogRead(0);
          client.print(F("sensor reading is "));
          client.println(F("<br />"));
        if ( c == '\n' )
        clib = true;
        else if ( c == '\r')
        clib = false;
  Serial.println("client disconected");

serial port says :

client disconected
new client
GET / HTTP/1.1
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8

each time I try to start the web server by entering the ip address it hangs

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131