Bluetooth Device Development using C#

As they say Necessity is mother of invention, I recently got a Jabra BT3030 Bluetooth headset. I paired it to my Windows Mobile phone. When I wanted to turn on the Bluetooth, I had to go to wireless manager and turn it on. I am a little bit lazy and had an idea why not map a button on the phone to toggle the bluetooh radio. But, this is not possible by default, so started working on a program to map to the button.

Fortunately it is very simple to interact with Bluetooth radio and devices on the phone using Windows Embedded Source Tools for Bluetooth Technology. This download contains bunch of C# files which you can directly use in your code. You will get classes such as BluetoothDevice and BluetoothRadio which allow you to control the device and paired devices.

   1: using System;
   2: using System.Collections.Generic;
   3: using System.Text;
   4: using Microsoft.WindowsMobile.SharedSource.Bluetooth;
   6: namespace ToggleBluetooth
   7: {
   8:     class Program
   9:     {
  10:         static void Main(string[] args)
  11:         {
  12:             BluetoothRadio brad = new BluetoothRadio();
  13:             if (brad.BluetoothRadioMode == BluetoothRadioMode.Off)
  14:                 brad.BluetoothRadioMode = BluetoothRadioMode.On;
  15:             else
  16:                 brad.BluetoothRadioMode = BluetoothRadioMode.Off;
  17:         }
  18:     }
  19: }

After that, I added a setup project and made sure that a shortcut for the application is under Programs folder, so that I can map it using the Buttons applet of Settings panel. After the install on the device, you should be able to see the program in the "Assign a program" list.

As usual, here are some links and blog post.

Windows Embedded Source Tools for Bluetooth Technology -

Channel 9 Wiki (has a good Q&A) -

MSDN Code Samples page -


Anil RV

Comments (3)

  1. rose says:

    how to enable and disable bluetooth on windows xp?

  2. j.d.b says:

    International language translation you are looking for bluetooth

    Geurido price is how much the retail price?

    Frequency range / km;? I'd also note that the details

    Farming. The engineer can work on!

    Here is the game in Paju, Korea wolrong h / p; 010 3342 4905

Skip to main content