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