Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

N+2 stability issue, stops working after some hours

stability dies n+2 Netduino plus 2 no errors instability

Best Answer MLA44, 11 December 2014 - 09:44 AM

Hi all,

 

As I have been reading on about people struggling with network communication, I may have solved the issue myself by changing the KeepAlive property of HttpWebRequest from true to false. This should prevent that I don't "run out" of sockets. At least I think so.

All my data is in the header anyway so no message is needed :-)

 

Any comments are welcome.

 

Regards,

Martin

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 MLA44

MLA44

    Member

  • Members
  • PipPip
  • 10 posts

Posted 10 December 2014 - 10:40 AM

Hi,

 

I'm experiencing stability issues with the n+2. I'm using VS2013pro and NETMF 4.3 and firmware 4.3.1.0.

 

My program does the following:

- all the usual initial stuff (prepare file for log on sd-card, update local time from time server etc.)

 

- starts a method that is executed on interrupt from external events to measure the time between events (by using an InterruptPort and NativeEventHandler). Runs approx. every 10 ms and contains only some simple math.

 

while(true)

- sleep(900) // the interrupt method is running x times

- disable the interruptPort above

- POST data using HttpWebRequest (only on local network)

- enable the interruptPort above

end

 

I also have some methods for handling remove/insert sd-card as well as posting error logs online as well as to sd-card.

I have lock() on all things, so that nothing is interrupted by other things and the only shared variable is also written/read in a lock(). I also have a lock() on the InterruptPort so that I don't disable it while it is running (even though it should not matter).

 

 

Especially, NOT having the interruptPort enabled while doing HttpWebRequest has eliminated the netduino hanging up with the (read in MFDeploy) message: Failed allocation for 5 blocks, 60 bytes

 

I have added a pin toggle to measure on a oscilloscope, just to see if there is some activity.

 

After running for somewhere between 30 minutes and a full day the Netduino "dies".

Sometimes there are no activity at all and some times my pin toggle still runs (in the later case its not dead).

However, my online POST just stops... no logs of any kind, no exceptions made (at least not in my code).

 

Does anyone have any ideas? I'm considering going back to VS2010 with NETMF 4.2 and frimware.

 

Martin



#2 MLA44

MLA44

    Member

  • Members
  • PipPip
  • 10 posts

Posted 11 December 2014 - 07:30 AM

When you initially create a new project in VS and chose to make the project for the Netduino Plus 2 the program.cs will have this line:

using SecretLabs.NETMF.Hardware.Netduino;
 
I changed that to:
using SecretLabs.NETMF.Hardware.NetduinoPlus;
 
... since it is a Netduino Plus 2 I have. I don't know the details, but I do know that there are hardware differences between the N+2 and the other boards. Does it matter which library is used? And if, which one should I use for the Netduino Plus 2?
 
And also, could this have anything to do with my problems above?
 
Regards,
Martin


#3 MLA44

MLA44

    Member

  • Members
  • PipPip
  • 10 posts

Posted 11 December 2014 - 09:44 AM   Best Answer

Hi all,

 

As I have been reading on about people struggling with network communication, I may have solved the issue myself by changing the KeepAlive property of HttpWebRequest from true to false. This should prevent that I don't "run out" of sockets. At least I think so.

All my data is in the header anyway so no message is needed :-)

 

Any comments are welcome.

 

Regards,

Martin







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.