Topic: Have finally fizzled out working with ethernet...in need of some help (Read 904 times)previous topic - next topic

My dad and I are trying to automate the shop using the arduino Uno and the ethernet shield. I've been trying for two days now to figure out why I can't get a reply from "http://.../?firmver" when we request it from the arduino.

Most of the commands won't need to return a value back to the requesting browser, but the firmver and similar commands have places in our web interface that they need to return data. Can someone help and enlighten me as to why this isn't working when "/?firmver" is requested? I'm really new to using the ethernet networking with arduino, but have a few things under my belt, but this isn't quiet making sense to me.

}If the length of the request is less than 80, do nothing. Otherwise do nothing. OK, I see why the length matters. Not.

Where does httpRequest ever get assigned a value other than ""?

I set httpRequest back to nothing just making sure it is empty for the next request, but I guess that really doesn't matter....

I'm not sure what the length limit is for, the code I posted is a modified sketch from: http://pastebin.com/CZ6J62qJ for controlling an LED via ethernet. I'm trying to modify it to work for my project, and I'm finding a few rough edges along the way.

but why is "http://myIP/?firmver" not returning 0.1.0 like it should, that part I'm not understanding...

Because you are asking if httpRequest ("") contains ?firmver. It doesn't, because httpRequest only contains nothing.

The code you removed did more than just print c. It also appended c onto the end of httpRequest, so that httpRequest contained "", "h", "ht", "htt", "http", ... , "http://yourIP/?firmver".At some point, then, httpRequest did contain ?firmver.

hmm, give me a bit to wrap my head around this, if i only clear that at the end of the loop, then it would contain the command, given that I possibly reconstruct the appended c part. Alright, given that, why does the LED toggle still?

I'm pretty new to this stuff, but I'm trying, still a few things I don't quiet have a grip on.

//zoomkat 12-8-11//simple button GET with iframe code//for use with IDE 1.0//open serial monitor to see what the arduino receives//use the \ slash to escape the " in the html //address will look like http://192.168.1.102:84/ when submited//for use with W5100 based ethernet shields

myservo.write(0); //set initial servo position if desired myservo.attach(7); //the pin for the servo co //enable serial data print Serial.begin(9600); Serial.println("server LED test 1.0"); // so I can keep track of what is loaded}