Hi,
I'm mostly a data acquistion guy and have leveraged the arduino forum to construct a web page to post the data. The web page has a fixed IP address. The sketch works great locally, however in full operation I get an occasional anomaly (connection reset from the browser), not sure if it is due to programming or the end application. Hoping for some guidance on how to determine the source of the error.
I'm using an arduino mega2560 from sunfounder with the older ethernet shield (R3) and measuring some temperatures and RPM of a turbine with a custom shield I have made. The system is located remotely in typical operation. The web page is served up through a couple ethernet switches and over a point to point wireless link and onto the internet via port forwarding using a global IP address. I get the same error on all the board stacks I have used, seems independant of the arduino stack hardware. I have a newer ethernet 101 board (for a trial) but have not yet integrated it to the system
Using arduino IDE serial monitor I capture the ethernet details from a browser data pull operation and they are included below. sort of mysterious to me.
//start serial capture
new client
GET / HTTP/1.1
Host: 192.168.1.18
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cache-Control: max-age=0
client disconnected
//end serial capture
The application works well locally, but when I pull the data remotely, I occasionally get a browser error that says the "connection reset" and all the browser data disappears. Same error dynamics using IE and firefox.
I note that in the sketch line 393 says to "disconnect client". I am wondering if the browser "connection reset" is due to this line of code or a failure in the remote link? as I said earlier, I never see this "connection reset" locally, only remotely. The remote data pull can take several seconds sometimes. I hope to increase the size of the data as a next step, so I need to solve this at this level of data capture.
Reduced sketch attached. this is a cut down version of my main application that makes the data capture generic, and has identical ethernet code for web page construction.
thanks in advance for your guidance,
tim
.
analog_shield_test_7_27_2016.ino (13.8 KB)
