WiFi connection

  • Thread starter Thread starter Alessandro Cavalieri
  • Start date Start date
A

Alessandro Cavalieri

Hi all,

May I detect the WiFi connection status and, more important, switch on the
adapter if it not connected?

I looked for that in OpenNETCF but found nothing.

Thanks,
Alessandro
 
I don't know about "switch on the adapter". That sounds like a
device-specific capability, but OpenNETCF.Net contains the ability to
enumerate and get the status of all of the network adapters on a device.
Other, control, capabilities are in the works...

Paul T.
 
Alessandro Cavalieri said:
Hi all,

May I detect the WiFi connection status and, more important, switch on the
adapter if it not connected?

I looked for that in OpenNETCF but found nothing.

Thanks,
Alessandro

Take a look at OpenNETCF.NET.

AdapterCollection ac = Networking.GetAdapters();
foreach (Adapter ad in ac)
{
if (ad.IsWireless)
{
// Get each of the Nearby Accesspoints for the wireless adapter
AccessPointCollection apColl = ad.NearbyAccessPoints;
foreach (AccessPoint ap in apColl)
{
// If this access point is the Accociated AP, then we care about
it
if (ap.Name == ad.AssociatedAccessPoint)
{
accessPoint = ap;
}
}
adapter = ad;
}
}

Also note there is a bug in the OpenNETCF.NET GetAdapters method. You
should be able to find notes on that on this site as well. It's a
simple fix, but does require a re-build of the OpenNETCF.NET
assemblies.

-a
 
Back
Top