Tools

Namespaces

Variants

Views

Actions

Search

Contents

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Bluetooth Engine API

Comments

20 Sep2009

Article Review by deepikagohil (20090920)

The class should derive from CBase since it's a C class.

This artilce gives an quick overview and approach to use the Bluetooth API. Blutooth API adds some more fuctionalities to use Bluetooth. All the detailed requirements are described in detail. Many functions of this API are presented with code-snippest. Capabilities required, Libraries to be linked, Header files to be included- all details are mentioned in the article.

The article simply gives essential information about Bluetooth Enginer API and it can be helpful to intermediate developers who intend to use this API because it is not a part of public SDK.

Contents

APIPurpose

The main purpose of Bluetooth Engine is to provide a higher-level abstraction API for Bluetooth applications and services.The Bluetooth Engine API provides access to MCM settings, Bluetooth device configurations and Bluetooth connection settings.

Header Files:

#include <bteng.h> #include <bttypes.h>#include <btdevice.h>

Link against:

LIBRARY bteng.lib bluetooth.lib btdevice.lib

CAPABILITY:

CAPABILITY LocalServices WriteDeviceData //for Set API's

Use cases

-Get/Set the value of Bluetooth MCM settings in this device. The Bluetooth MCM settings include the Bluetooth power state, discoverability mode, search mode, local Bluetooth name and Bluetooth SAP enable state

-Get a list of the paired Bluetooth devices stored in the local Bluetooth registry.Bluetooth Engine retrieves the devices via Bluetooth registry client API. The list of devices will be ordered by locale standard collation.

-It adds/retrieves/modifies/deletes a device(s) into/from Registry and also Sets the device security.

Example code

1)Derive your class from MBTMCMSettingsCB and implement the functions in them.