Network Availability
#1
Posted 31 January 2012 - 06:56 PM
#2
Posted 31 January 2012 - 08:00 PM
Is there a way to detect - without NetworkAvailabilityChange - whether or not it's available? I'd like to not even attempt anything if I know it's not plugged in.
Are you avoiding NetworkAvailabilityChange because it doesn't help with the initial state?
-Valkyrie-MT
#3
Posted 31 January 2012 - 08:13 PM
I'm implementing NetworkAvailabilityChange, but I need to know what the initial state is. Basically something along the lines of IsCableConnected in the GHI assemblies. Still exploring - so I apologize if the answer is right under my nose. :-)Are you avoiding NetworkAvailabilityChange because it doesn't help with the initial state?
-Valkyrie-MT
#4
Posted 01 February 2012 - 05:17 AM
#5
Posted 01 February 2012 - 07:29 AM
Right - it does, but it only fired when something happens. For example:I stopped implementing the NetworkAvailabilityChange a while back - but I recall the event args having a connected bool?
Cable NOT plugged in -> Power N+ -> Plug in Ethernet -> NetworkAvailabilityChange fires with TRUE and tells me it's available
Cable PLUGGED in -> Power N+ -> Unplug Ethernet -> NetworkAvailabilityChange fires with FALSE and tells me it's unavailable
Cable PLUGGED in -> Power N+ -> do nothing . . . have no idea if it's available or not.
The third scenario is what I'm after. I need (want) a way to query whether or not the cable is plugged in instead of waiting for an event. As I pointed out, the GHI assemblies can do this - but i'm running NETMF 4.2, so they're not compatible, and I have no idea if I could use them in the first place.
#6
Posted 15 May 2014 - 03:14 AM
Has anybody figured out this yet? I am trying to find out the initial state of the Ethernet upon power-up and am unable to find any functions in NETMF to do this.
I know that GHI has Ethernet.IsCableConnected but I do not see the equivalent for the Netduino Plus 2.
Is there maybe a hack that could be thrown together? Like powering down the Ethernet chip and then powering it back up to force the events to fire?
Any ideas?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users