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.

wendo's Content

There have been 34 items by wendo (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#62819 Split: Waiting on Netduino.IP preview builds

Posted by wendo on 23 May 2015 - 08:40 PM in Netduino.IP Technical Preview

Sadly, as seems to be the norm with Netduino, rather than getting something working first, it's perpetually stuck in the adding features and expanding scope phase without ever finishing the original features. 

 

Chris, you're obviously aware this isn't the first time your ETA's have been laughable, ridiculously optimistic. Your original post on this topic is from January, saying releases every 2 weeks. It's no almost June and there has still only been one. You say there have been internal ones, but why make the fortnightly releases claim unless you're actually going to release them? Not to mention you again make the couple of weeks call on 30th April and again... no release, and in those 5 months, other than adding Wifi we'll get an IP and MAC address. At this rate sending actual traffic is years away

 

I think it's fair to say your existing users want reliable networking on existing hardware. We don't want a wifi stack for hardware we don't have, we want our existing hardware to work the way it was supposed too.

 

Honestly, this is probably my last post here. I'll be walking away from the Netduino community and hardware as it's now obvious you guys can't deliver on promises (The modules for the GO are probably the biggest example of this) and rather than working on promised hardware and updates instead would rather spend time on shiny new stuff (the Netduino 3).

 

Yes, some of this is problems with NETMF (which I'll also be avoiding) but none of the projects I've ever tried on the Netduino have ever been able to run long term. If you want your devices at the center of IOT then they need to be reliable, and not take years after release to get there




#61915 Netduino.IP Technical Preview (Build 1)

Posted by wendo on 20 March 2015 - 07:34 PM in Netduino.IP Technical Preview

Well this will be interesting. I have a project that was basically useless because of the network issues. Just updated one of my NP2's and we'll see how it goes. I was rebooting every hour as a really ugly work around but hopefully this will fix that




#60583 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 30 October 2014 - 03:50 AM in Netduino 2 (and Netduino 1)

It has been in a try/catch the whole time, but it was still bombing out....

 

However, it's been happily running for something like 5 days now, and while it reports the stacktrace now, it's not locking up. I _think_ I either had a dodge network cable or is was the passive POE injector I was using (maybe a combination of both).

 

I've switched toa new network cable and removed the POE injector and it appears to be stable....

 

You'd think working in IT I would have looked at that earlier :). I also think putting it in it's own thread and using autoreset has helped too but at the moment I'm leaning towards the cable. After I hit a week I'll put the injector back in and see what happens.

 

Thanks for all your help on this. 




#60551 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 26 October 2014 - 09:28 PM in Netduino 2 (and Netduino 1)

Right, with ex.Stacktrace we have some success. I'm seeing 

 

SF: System.Net.HttpWebRequest::GetResponse
TempReceiver.Program::Upload_Thread
 
which is about what I had figured. I've seen some people claim the timeout setting doesn't work at the moment in NetMF so that may be related.
 
Also, congratulations on the wedding!



#60459 I2C with a display

Posted by wendo on 19 October 2014 - 07:51 AM in Netduino Plus 2 (and Netduino Plus 1)

It looks like it runs a custom command set so the drivers already written aren't likely to work. There is serial driver for the display written for the GHI hardware that should be fairly easy to port here. Obviously that doesn't get you I2C but it would at least get it going although it'd still take some porting work to remove all the GHI library requirements.

 

Failing that if an Arduino driver is available you could try porting it directly




#60412 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 14 October 2014 - 04:24 AM in Netduino 2 (and Netduino 1)

So now I'm onto trying an AuroResetEvent since the delay in the main code just ended up crashing the main thread.

 

The weirdest thing is that I'm still not actually catching the exceptions in the catch block. I've added some text to the Debug.Print so now it looks like this

 

Debug.Print("SF: " + ex.Message);

 

and I get the occasional "SF:" printed, but no actual error. 

 

Still, we'll see if this is any more reliable...




#60402 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 13 October 2014 - 01:55 AM in Netduino 2 (and Netduino 1)

I think what I'll do is just kill the 30 second timer and call the UploadData routine directly from my main loop, which has been completely empty until now with a Thread.Sleep(Timeout.Infinite) so I'll throw a while loop there with a Thread.Sleep(30000) and just call UploadData from there.

 

That should hopefully sort out the timer being killed issue and I should be able to catch the damn errors




#60385 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 10 October 2014 - 07:58 PM in Netduino 2 (and Netduino 1)

Can you give me a quick example of that by chance? I've done threads before so thats fine, just the blocking and manualreset that I've never heard of before. Also, thanks heaps for all the help!




#60378 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 09 October 2014 - 09:28 PM in Netduino 2 (and Netduino 1)

After a lot of random googling, it looks like this behavior is actually "by design"

 

Timers using System.Threading.Timer will terminate upon an exception, no matter what you do with it, see here

 

There appear to be a couple of other options I can try although they use System.Timers.Timer and I'm not sure that's in NETMF and not in a position to look right now




#60372 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 08 October 2014 - 06:03 PM in Netduino 2 (and Netduino 1)

catch (Exception ex)
{
    Debug.Print(ex.Message);
}

The exceptions that occur appear to kill the timer that calls UploadData as far as I can tell. I've still got the debug.print command I added to show the free memory and once one of the exceptions hits that timer stops firing (it's the first line in the subroutine)




#60365 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 08 October 2014 - 03:55 AM in Netduino 2 (and Netduino 1)

As far as I'm aware I'm catching everything. I haven't changed any settings to limit what I'm catching and I assume the default is to catch everything?!




#60359 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 06 October 2014 - 06:32 PM in Netduino 2 (and Netduino 1)

No, not at all, both sites are internet based so it's entirely possible they are down or have some other issue...

 

The question is how do I handle that cleanly and without causing an exception? Embedding the statement in another try block doesn't work as I've also just gotten a 10053 error (connection aborted) at the same place.

 

Ideally what I'd like to be able to do is detect the exception and either just ignore it (since I'll send again in 30 seconds anyway) or retry it




#60354 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 06 October 2014 - 07:31 AM in Netduino 2 (and Netduino 1)

Right, so I got an exception from System.Net.Sockets with an errorcode of 10060 and an m_HResult (whetever that is) of 4278190080 as this line 

using (var response = (HttpWebResponse)request.GetResponse())

10060 appears to be a timeout 

 

My question is why does a timeout cause an exception, and secondly shouldn't the try block that this is encased in catch this anyway? Or does a try block only catch exceptions from the next line?




#60345 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 04 October 2014 - 11:07 AM in Netduino 2 (and Netduino 1)

So, not a memory leak, free memory stays pretty static around 79000

 

Is there some way I can catch the exceptions coming from System.Net and System.Http?




#60320 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 02 October 2014 - 03:56 AM in Netduino 2 (and Netduino 1)

I haven't, but that's only because I have never known how too :)

 

With only an initial NTP sync I still see it so it's not NTP that's causing the problem. I actually captured the exception and it's coming from inside System.http.

 

I do suspect a memory leak but as far as I can tell it's inside the HTTP library. Anyway, I'll start tracking it now and we'll see what we end up with. The error doesn't appear to be the actual cause of the lockups, at least not directly, the lockup itself is the above mentioned exception (so not technically a lockup) and the errors occur multiple times before that happens, seemingly at random. It also doesn't appear to be tied to one site specifically as I've enabled and disabled both the sparkfun stream and the weather underground stream and it continued to happen on both, so it's not some screwy response from the server causing it.




#60287 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 29 September 2014 - 08:38 AM in Netduino 2 (and Netduino 1)

Locking didn't help, onto doing a single NTP sync on boot and seeing what happens with only the web traffic




#60285 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 29 September 2014 - 06:11 AM in Netduino 2 (and Netduino 1)

The idea is for this to pretty much run uninterrupted for long periods of time so startup may only happen once every few months. I could probably push it out to once a week but I've got it going as often as it is pretty much exactly to catch these sorts of things :)




#60282 DHT11/22 sensor managed driver

Posted by wendo on 29 September 2014 - 01:51 AM in Project Showcase

When playing with these sensors I notice they take quite a while to stabilize after any changes. It may be as simple as moving between 3.3v and 5v VCC and they need some time to settle.




#60281 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 29 September 2014 - 01:48 AM in Netduino 2 (and Netduino 1)

Thanks for that, and for the record, the toolbox HTTP_Client appears to make it much much worse. I'll see how I go with adding some locks. Failing that I might add an RTC and remove the NTP code entirely and see if the problem persists




#60270 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 28 September 2014 - 06:41 AM in Netduino 2 (and Netduino 1)

I've switched over to the Toolbox HTTP_Client library rather than the built in one to see if that may help, I'll also look at switching over to the Toolbox NTP library too if I continue to see it and go from there. I'd still love to know how to lock the code blocks though




#60269 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 28 September 2014 - 05:53 AM in Netduino 2 (and Netduino 1)

I'm getting a little lost trying to implement the locks. both lock and Monitor appear to require you specifying the actual object s to protech, but I just want to lock entire code blocks, and the objects are different in each block anyway?!

 

Thanks




#60253 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 27 September 2014 - 06:21 PM in Netduino 2 (and Netduino 1)

I put the dispose in there as I had the same idea that it was a memory leak so I wanted to make sure the request was being cleaned up. 

 

In saying that, I haven't seen the same issue for a couple of days now so I'm wondering if something else I've done has fixed it. Code is attached below. It's a decent size so it's not inline.

 

Basically I have an arduino with weather sensors attached mounted outside. It sends all the data to the Netduino via an nRF24L01+ radio system every 10 seconds and from there the Netduino uploads it to Sparkfun (and now Weather Underground) ever 30 seconds. 

 

Just thinking about how I've seen this happening it's possible the errors are actually coming from the NTP syncing which I'm doing once an hour as the only time I've seen these errors is when I've left MFDeploy sitting running for hours/days and I've had to remove all the Debug.print statements from my program to even see them as the scrollback buffer was never long enough so I don't know for sure that it's coming from the original timer.

 

Any ideas welcome

Attached Files




#60229 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 25 September 2014 - 07:32 PM in Netduino 2 (and Netduino 1)

I should mention I'm running 4.3.1 firmware. Here's hoping they will fix it and we'll get a new firmware release otherwise my weather station receiver will need to move platforms. It's not ideal to have a data logger that stops logging data every day




#60217 enc28j60_lwip_recv: input alloc packet failed

Posted by wendo on 25 September 2014 - 09:08 AM in Netduino 2 (and Netduino 1)

Hi

 

I'm getting this error intermittently on my N2+ when trying to send an HTTP GET command. I'm also getting "IP Address: <ip address>" printed semi regularly that isn't generated from my code. Presumably both are coming from a lower level and I have managed to track down the error message in what appears to be the NETMF firmware files, but it doesn't really make much sense to me.

 

The code that's generating the error is as below. It's called every 30 seconds from a timer. Can anyone explain what I'm doing wrong or how to get rid of the error? It seems to recover from this most of the time and continue but other times it then stops sending network traffic, although the rest of the program continues on fine.

        private static void UploadData(object sender)
        {
            var URLString = "http://data.sparkfun.com/input/" + sfPublicKey + "?private_key=" + sfPrivateKey + "&humidity=" + humidity.ToString("F1") + "&pressure=" + pressure.ToString("F0") + "&rain=" + rainfall.ToString("F0") + "&temp=" + temp.ToString("F1") + "&voltage=" + voltage.ToString("F2") + "&winddirection=" + windDirection.ToString("F0") + "&windgust=" + windGust.ToString("F1") + "&windspeed=" + windSpeed.ToString("F1") + "&charging=" + charging.ToString();
 
            try
            {
                using (HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URLString))
                {
                    request.Method = "GET";
                    request.KeepAlive = false;
                    request.Timeout = 5000;
                    request.ReadWriteTimeout = 5000;
 
                    using (var response = (HttpWebResponse)request.GetResponse())
                    {
                        if (response.StatusCode != HttpStatusCode.OK)
                        {
                            Debug.Print("HTTP Status:" + response.StatusCode + " : " + response.StatusDescription);
                        }
                    }
                    request.Dispose();
                }
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }
        }



#59988 Safe code to convert byte[4] to float

Posted by wendo on 04 September 2014 - 09:13 AM in General Discussion

Oh wow, I'm on 4.3 but had missed that piece of information.... that'll make life EASY!

 

Thanks

 

And Baxter.... that's crazy, and awesome :)





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.