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.

Wim Roeling

Member Since 24 Feb 2011
Offline Last Active Oct 26 2020 11:00 AM
-----

Posts I've Made

In Topic: Socket error #10055 (WSAENOBUFS)

11 June 2012 - 01:31 PM

Maybe (I did not test this) it helps to check first if the socket it ready to send data:

if (Connection.Poll(-1, SelectMode.SelectWrite)) {
   Connection.Send( yourData );
}

In Topic: First chance Socket Exception on socket.Accept()

20 May 2012 - 08:56 AM

I see this piece of code very often (it's in every Google hit on webservers with Netduino). It is easy to solve the problem that you all have by interting a try / catch block within the while (true) loop.
What happens is that for some reason an error may occur. This will stop the listener, it will never recover from it. I had the same problem: sometimes the webserver worked for a day and than it suddenly stopped. Whit the modification above it has worked continuously for many months.

Pattern:
public void listen()
{
   while (true)
   {
        try
        {
             // your listener code here ...
             // .....
             // .....
        }
        catch (Exception)
        {
             // ignore
        }
    }
}
Kind regards,
Wim Roeling
The Netherlands

In Topic: Firmware update

16 March 2012 - 09:06 AM

Wim, if it may help, do you live nearby Breda? You're from the NL right? If so, I would love to help out?

Yes, I am from the NL, Vlaardingen.
And as you can see I finally did a successful update to 4.2 after all.

In Topic: Firmware update

16 March 2012 - 09:05 AM

Hi Wim,

Very strange. There's a lot of new code in .NET MF 4.2 beta, but we're having pretty good luck around here with RC4.

If you can boil down a repro case to a few dozen lines of code...I'd love to test it and help get to the root of the issue.

Chris

Chris,

I goto it to work yesterday, as you can see from my previous reply. Thanks anyway!

In Topic: Firmware update

15 March 2012 - 10:15 PM

Hi Wim,

Remove that assembly from your project references, and then add this one in instead:
C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\SecretLabs.NETMF.IO.dll

Chris

I didn't need that assembly after all, so I organized my usings and deleted it.
But still the 4.2 Netduino is refusing to work properly. Very small projects (like a blinking LED and that sort of stuff) work fine, but more complex projects all fail. Even stranger: A complex project that I almost completely stripped while leaving the unused methods in the project also fails. (Size of assemblies 16752 bytes). It doesn't even get into the first instruction in the debugger. I'm really puzzled now. The network seems to be ok (I can ping the device) but that's all the life I can see. My LCD display does nothing, etc..
My other Netduino with firmware 4.1 runs all those same projects OK.

------------------------------------------------------------------------------
FORGET ALL THE ABOVE - It's working fine now!!! I forgot to deploy a sub project to the 4.2 target framework. The compiler does not give a warning for this, like it does for the main project. Thanks for your patience anyway!

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.