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

Network Availability


  • Please log in to reply
5 replies to this topic

#1 jwjames83

jwjames83

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationMichigan, USA

Posted 31 January 2012 - 06:56 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.

#2 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

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 jwjames83

jwjames83

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationMichigan, USA

Posted 31 January 2012 - 08:13 PM

Are you avoiding NetworkAvailabilityChange because it doesn't help with the initial state?

-Valkyrie-MT

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. :-)

#4 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 01 February 2012 - 05:17 AM

I stopped implementing the NetworkAvailabilityChange a while back - but I recall the event args having a connected bool?

#5 jwjames83

jwjames83

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationMichigan, USA

Posted 01 February 2012 - 07:29 AM

I stopped implementing the NetworkAvailabilityChange a while back - but I recall the event args having a connected bool?

Right - it does, but it only fired when something happens. For example:

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 Billy Propes

Billy Propes

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • LocationVincent, OH, USA

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

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.