For the test project, we're using the web client example from the netmftoolbox project but updated for 4.2. We then changed the GET to a POST to test inserted data in the a database via php. This works well.
We then wrapped the code in a while to test longevity as this needs to be running for at least a few weeks at a time.
public static void Main() { OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); // Creates a new web session HTTP_Client WebSession = new HTTP_Client(new IntegratedSocket("www.SERVERNAME.com", 80)); int numTests = 720; while (numTests > 0) { // Requests the latest source HTTP_Client.HTTP_Response Response = WebSession.Post("/InsertTest/InsertTest.php", "ID='',data=TestData"); // Did we get the expected response? (a "200 OK") if (Response.ResponseCode != 200) throw new ApplicationException("Unexpected HTTP response code: " + Response.ResponseCode.ToString()); led.Write(true); Thread.Sleep(2500); led.Write(false); Thread.Sleep(2500); numTests--; } }
Regardless of how long I sleep for (tested between 250 ms and 10000 ms) the application on the N+ becomes unresponsive (led stops blinking) but no exception is thrown and the debugger never disconnects. I also tried this without being attached to the debugger and got that same result.
I know I should aggregate the data and upload in batches instead but this should still work and leads me to believe there is some sort of memory leak in the firmware.