Netduino home hardware projects downloads community

Jump to content

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


Member Since 11 Aug 2010
Offline Last Active Feb 21 2014 06:54 AM

Posts I've Made

In Topic: Crash on network socket unplug

07 August 2012 - 05:41 AM

this is not working for me. I'm using 4.2 RC5 and the event about network up/down is not propageted. Anybody using RC5 too?

Sorry, I can't help you. I gave up after a rude personal email from Chris. I literally threw all the netduinos my company used in the garbage bin and replaced them with devices from GHI, and use those plus custom hardware exclusively now. That's the only recommendation I can make, but someone else may have found fixes in the 4.2 RCs.

In Topic: Crash on network socket unplug

28 September 2011 - 11:28 PM

I chose to change my arduinos with netduinos to add ethernet to my projects. If thought multi-thread can avoid hangs caused by network delay. I was desapointed when I saw my netduino hangs when I unplugged the cable...

I hoped that the netduino hang until the connect timeout raise. I didn't have the time to test it and I really need my input interruption been catch even when I try to send networks request so I let it untouched.

In the test of the first post, is the catching of the exception still in the main loop ?

It seems that Secret Labs is confident about resolving the issue in the next 4.2 firmware, so it may not be an hardware problem. We just have to wait ... RC3 is annonced in few days (weeks ?)

Thanks, Ricco. So, this is a known issue? I've been trying to find info in the forums about betas, etc, but it's really hard to dig through.

This is only an issue where the cable is unplugged when the device is powered on. If the cable is plugged in when it is powered up, you can add some code like this:

static bool networkAvailable = true;

void main()
   NetworkChange.NetworkAvailabilityChanged += 
      new NetworkAvailabilityChangedEventHandler(NetworkChange_NetworkAvailabilityChanged);
   while (true)
      if (networkAvailable)
         using (socket = ConnectToServer())

static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
    Debug.Print("Network Availability Changed : IsAvailable = " + e.IsAvailable.ToString());
    networkAvailable = e.IsAvailable;

In Topic: Crash on network socket unplug

28 September 2011 - 10:41 AM

It would be a lot easier if there was a simple way to get at whatever is being used by the NetworkChange class to detect a change in the network availability. I can use that to prevent attempting to connect if the network cable is pulled out *after* the program starts, but not to detect if it is not up *when* the program starts. There is a nice pin (14) that would be perfect on the Ethernet PHY that's not connected to anything. I'd love to know why that decision was made given that there are plenty of free pins on the CPU. I'm getting a little frustrated. I could use mBeds but they're such a pain, having to use IP stacks of unknown quality written by 3rd party developers.

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.