SDF 2.3: Controlling Radio Power

We still need to put together a list of “what’s new” in SDF 2.3 – it’s a bit of a challenge, and we’re a little busy here – but in the meantime I’ll try to blog about some of the features that come to mind.

One simple new item if the ability to change radio power states (WiFi, Bluetooth and Phone) on WinMo devices.  Here’s a quick example of how it might be done:

using OpenNETCF.WindowsMobile;

namespace SmartDeviceProject1
{
   public static class Utility
   {
     public static void SetWifiRadioPower(bool turnOn)
     {
       foreach (IRadio radio in Radios.GetRadios())
       {
         if (radio is WiFiRadio)
         {
           radio.RadioState = turnOn ? RadioState.On : RadioState.Off;
         }
       }
     }
   }
}

2 thoughts on “SDF 2.3: Controlling Radio Power”

  1. This works great on Windows Mobile. Just curious if it could be made to work on non-Windows Mobile, CE 5.0 devices.
    Any chance?
    Thanks,
    – jevans

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s