O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HOW TO CHECK IF THE BLUETOOTH STACK IS LOADED

This project is contained in the source code zip file for this project in the directory BTStackCheck. The code snippets used here are also in source code zip file as chapter30Code.txt.

In this activity you create a native code application that attempts to see if the Bluetooth stack is loaded. This checks only to see if the operating system Bluetooth stack drivers have been loaded, regardless of whether the Bluetooth hardware device is present. For this activity a suitable Bluetooth USB dongle is required that has the Cambridge Silicon Research (CSR) hardware (as many do) because this is the default Bluetooth hardware driver that is included in the catalog. The help documentation says that no hardware driver is provided, just everything in the stack above; but the CSR one is there, as bthcsr.dll.

First, you need to check that your Bluetooth dongle works:

1. Insert it into your desktop system and let it load the drivers.

2. Examine it under Device Manager/Bluetooth Radios. You should see two entries:

  • CSR Bluetooth Radio
  • Microsoft Bluetooth Enumerator

Now create the test application and try it out on the OS before the Bluetooth stack has been added:

1. Start with a Compact 7 Retail image that runs on hardware.

2. Add a new a new native code application:

  • Console Application
  • BTStackCheck
  • Simple Console Application
  • In Solution Explorer/Properties (OS, not the Subproject), set it to be built in debug mode and excluded from the image ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required