Bluetooth Pairing Service Overview

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

The Bluetooth Pairing Service is a middleware component that manages the service discovery process and the Bluetooth–enabled device–pairing process. It provides an interface to control the discovery and pairing process, and to manage the set of paired Bluetooth–enabled devices. It also maintains a database of Bluetooth profile information for each of the paired devices.

The Bluetooth Pairing Service provides the following capabilities:

  • Enable or disable Bluetooth radio
  • Start or stop discovery of Bluetooth–enabled devices nearby
  • Start or stop pairing with a selected Bluetooth–enabled device
  • Enable or disable Bluetooth discovery mode

Bluetooth Pairing Service Architecture

The Bluetooth Pairing Service provides a higher–level layer for interacting with Bluetooth features, including control over Windows Embedded CE powered device discoverability through Bluetooth profile implementations, and management of paired device information.

The following illustration shows the Bluetooth Pairing Service architecture:

Bluetooth Pairing Service Architecture

Discovery mode is a mode in which the Windows Embedded CE powered device looks for a nearby Bluetooth–enabled device to pair with.

Discoverable mode is a mode that enables the Windows Embedded CE powered device to be found by a nearby Bluetooth–enabled device so that the Bluetooth–enabled device may establish a pairing relationship to Windows Embedded CE.

The Bluetooth Pairing Service controls device discovery through Bluetooth inquiry scans.

When discovery mode is enabled, the Bluetooth Pairing Service conducts Bluetooth inquiry scans and waits for notification of a pairing event from the Bluetooth stack. When notification is received (and the PIN negotiation is successful), the device's Bluetooth address (BT_ADDR) is checked against the existing set of known devices. If an existing record is found for the device, the Bluetooth link key is obtained again, and the device record is updated.

When a device is found, then the service discovery process is started. The list of services that the Windows Embedded CE powered device queries for is configured through the registry. This list of services is static and will be updated as additional profiles and applications are added to the device. If the device is shown to support one or more of the queried profiles, then it is added to the appropriate device list, and the record information is written to the system registry using the Persistence/Settings Manager.

Note

Service discovery will not be repeated if the device is already in the paired devices list because it is not expected that the device profiles will change for a specific device.

The Bluetooth Pairing Service maintains a list of paired devices. As new successful Bluetooth pairing events occur, new paired devices are added to the list. Removal of devices from the list can only occur by specific API calls. Removal of a paired device that is currently active is allowed, but note that the communication port through which the paired device is connected will be deregistered during removal of the active paired device.

The pairing/profile information list will be stored in memory for speed/ease of access, and the registry contents will only be updated as paired devices are added, deleted, or updated.

Cc510523.security(en-us,MSDN.10).gifSecurity Note:
If a new profile is added, authentication should be required and implemented.

Discoverable mode is disabled either by using the Bluetooth Pairing Service API, after a timeout period expires, or following a successful pairing event. For each discoverable session, only one device pairing event can occur.

Dependencies

The Bluetooth Pairing Service has the following dependencies:

  • Bluetooth stack provided by Windows Embedded CE
  • BTH API calls
  • Service Discovery Protocol (SDP)
  • Synchronous Connection–Oriented (SCO) logical transport

Support for the Bluetooth Pairing Service in an OS Design

To add support for the Bluetooth Pairing Service, include the Pairing Service Catalog Item (SYSGEN_BTH_PAIRSVC) in your operating-system (OS) design.

Note

The Bluetooth Pairing Service is not compatible with the existing sample pairing Control Panel item (bthpnl), the sample pairing service (btsvc), nor the sample pairing API (btenum) that are available in Windows CE 5.0.

See Also

Concepts

Overview of Bluetooth Pairing

Other Resources

How to Create and Manage Bluetooth Pairing Relationships