Go Down

Topic: Arduino Ethernet shield (Read 2549 times) previous topic - next topic

SurferTim

Probably not. That is my thread. I am the user that found the solution. The obvious symptoms of that would be a lockup in a "while(client.available())" loop.

That is the 605 bug.
http://code.google.com/p/arduino/issues/detail?id=605

WouterN

Maybe it's lockup in the following loop and is that the reason that it is not responding..?

Code: [Select]
while (client.connected()) {
      if (client.available()) {

        if(!sentHeader){
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          sentHeader = true;
        }

        char c = client.read();

        if(reading && c == ' ') reading = false;
        if(c == '?') reading = true; //found the ?, begin reading the info

        if(reading){
          readstring += c;
        }
       

        if (c == '\n' && currentLineIsBlank)  break;

        if (c == '\n') {
          currentLineIsBlank = true;
        }else if (c != '\r') {
          currentLineIsBlank = false;
        }
      }

       
         }


SurferTim

Change the if to while. That seems to work much better.
Code: [Select]
while (client.connected()) {
      while (client.available()) {



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!

Arduino
via Egeo 16
Torino, 10131
Italy