NetDuino Stability and Uptime - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
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

NetDuino Stability and Uptime

Stability Uptime

  • Please log in to reply
9 replies to this topic

#1 Marcello M

Marcello M

    New Member

  • Members
  • Pip
  • 4 posts

Posted 31 January 2013 - 10:04 AM

Hi to all.I just purchased netduino plus 2 and would like to share the experiences of the forum to understand the stability and uptime of Netduino Plus 2. You can write your reports.

 

Thnks to all.....Marcello



#2 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 31 January 2013 - 12:17 PM

So far the hardware is rock solid as long as your code is rock solid.  I have netduinos that have run for weeks without a problem.  They may have run longer but I had to deploy updates to them.



#3 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 31 January 2013 - 04:09 PM

I drove 100 RGB LEDs based on a netduino for my christmas tree and it survived a a couple of weeks as well, no problems at all.


"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#4 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 31 January 2013 - 08:58 PM

I have a NP2 temp logger that reads a SD18B20 via OneWire, then uploads the result to COSM every 10 seconds, it normally runs for days before it hangs in the network part of the program.

 

I think it's because there is some unknown error on the network between me and the COSM server in the other end of the world, however my code does not handle errors in any way.

 

I don't know how to fix it, because no exception is thrown, it just hangs.



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 31 January 2013 - 09:29 PM

Marcello - lots of commercial projects using embedded Netduinos in-field. Some of them add on external watchdogs "just in case" but generally speaking we have not seen uptime issues. Lunddahl - if you have a chance, it would be great to get a network capture at the time that your COSM connection is dying. I'm not aware of any bugs in the latest lwIP which could case that...but if there are, we'd love to figure out how to repro it. Chris

#6 Marcello M

Marcello M

    New Member

  • Members
  • Pip
  • 4 posts

Posted 01 February 2013 - 08:35 AM

Thank Chris, can you please provide  to us electornic principiant, some link to improve Netduino stability  with watchdogs or other solutions. I don't know nothing about this....The only one watch dog witch i know is in my garden...



#7 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 01 February 2013 - 12:23 PM

Introduction to Watchdog Timers
 
A simple watchdog for the Netduino - Mario Vernari



#8 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 01 February 2013 - 10:18 PM

Lunddahl - if you have a chance, it would be great to get a network capture at the time that your COSM connection is dying. I'm not aware of any bugs in the latest lwIP which could case that...but if there are, we'd love to figure out how to repro it.

 

Well, that would be hard for me, as it can take days for it to hang, i have a feeling that there is something wrong with my network and COSM in general, because i send data to COSM every 10 seconds, but it seems that COMS only get a little percentage of my updates.

 

Sending data every 10 seconds gives me roughly an update on COMS every minute, sometimes 3 times in a minute, and sometimes nothing for 5 minutes.

 

I used to use code where i waited for the answer from COSM, but have shifted to just firing off the HTTP request, and then closing the socket.

 

Here is my COSM client class:

 

using System;using System.IO;using System.Net;using System.Net.Sockets;using System.Text;using Microsoft.SPOT;namespace Lunddahl{    public static class CosmClientSimple    {        const string host = "api.cosm.com";                public static void Send(string apiKey, string feedId, string sampleData)        {            try            {                using (Socket connection = Connect(host, 5000))                {                    SendRequest(connection, apiKey, feedId, sampleData);                }                            }            catch (Exception e)            {                Debug.Print(e.ToString());            }        }        static Socket Connect(string host, int timeout)        {            // look up host’s domain name to find IP address(es)            IPHostEntry hostEntry = Dns.GetHostEntry(host);            // extract a returned address            IPAddress hostAddress = hostEntry.AddressList[0];            IPEndPoint remoteEndPoint = new IPEndPoint(hostAddress, 80);            // connect!            var connection = new Socket(AddressFamily.InterNetwork,            SocketType.Stream, ProtocolType.Tcp);            connection.Connect(remoteEndPoint);            connection.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);            connection.SendTimeout = timeout;            return connection;        }        static void SendRequest(Socket s, string apiKey, string feedId, string content)        {            byte[] contentBuffer = Encoding.UTF8.GetBytes(content);            const string CRLF = "rn";                        var requestLine = "PUT /v2/feeds/" + feedId + ".csv HTTP/1.1" + CRLF;            byte[] requestLineBuffer = Encoding.UTF8.GetBytes(requestLine);                        var headers = "Host: api.cosm.com" + CRLF +                          "X-ApiKey: " + apiKey + CRLF +                          "Content-Type: text/csv" + CRLF +                          "Content-Length: " + contentBuffer.Length + CRLF + CRLF;                        byte[] headersBuffer = Encoding.UTF8.GetBytes(headers);                        s.Send(requestLineBuffer);            s.Send(headersBuffer);            s.Send(contentBuffer);        }    }}

 

 

Any feedback from anyone is appreciated. :-)

 

- Ulrik



#9 Marcello M

Marcello M

    New Member

  • Members
  • Pip
  • 4 posts

Posted 07 February 2013 - 12:24 PM

I see the watchdog from this link. A simple watchdog for the Netduino[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;] - [/color]Mario Vernari

Thanks to all forum. May be i need it....


#10 JoopC

JoopC

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts

Posted 07 February 2013 - 09:27 PM

Well, that would be hard for me, as it can take days for it to hang, i have a feeling that there is something wrong with my network and COSM in general, because i send data to COSM every 10 seconds, but it seems that COMS only get a little percentage of my updates.

 

Sending data every 10 seconds gives me roughly an update on COMS every minute, sometimes 3 times in a minute, and sometimes nothing for 5 minutes.

 

I used to use code where i waited for the answer from COSM, but have shifted to just firing off the HTTP request, and then closing the socket.

 

Here is my COSM client class:

 

 

Any feedback from anyone is appreciated. :-)

 

- Ulrik

 

this will solve your problem:

 

after socket . send........

 

socket.Poll(500000, SelectMode.SelectRead)

 

here you can download the software and see how we did it:

 

http://p1netduinoplus.codeplex.com/







Also tagged with one or more of these keywords: Stability, Uptime

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.