Skip to content

It’s not you, Comcast – it’s me – Arduino Server is Fine

February 6, 2015

I fired up an original arduino sketch with the seeed ethernet shield on the comcast 10.0.0.x lan and it’s fine. My conclusion is that it’s some part of the protocol that i didn’t honour and the other environments have been more forgiving. In my usual too detailed approach i’ll probably make a simple test case and try it on arduino and olduino and look at a logic analyzer trace.
15-02-06 arduino

It’s certainly not the sophisticated html the arduino’s using to send the page

        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("<br />");
          }
          break;
        }
        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
    delay(1);
    // close the connection:
    client.stop();

and it’s not the sophisticated termination sequence:

    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();

Update: I dunno, the arduino server does show some choppiness on the comcast network. I’ll see what the logic analyzer shows.

Advertisements

From → web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: