Bluetooth Client Library (Bluetooth User) Overview

The Bluetooth Client Library component (Bluetooth User) provides APIs for configuring and managing Bluetooth® connections.

Purpose

The Symbian platform Bluetooth subsystem provides developer support for creating Bluetooth aware applications. Bluetooth User is a collection of components and their corresponding DLLs that set up, configure and manage Bluetooth sockets, access the HCI, and configure Bluetooth AV sessions.

Key concepts and terms

The following terms are used:

Bluetooth library

Provides setup and configuration details such as device type, Bluetooth sockets and link management options.

Bluetooth sockets

Sockets provided by CBluetoothSocket instead of RSocket. CBluetoothSocket::Connect() takes a TBTSockAddr, whose constructor TBTSockAddr::TBTSockAddr() takes a TSockAddr.

Audio / Visual library

Provides useful setup, configuration and error handling for Audio / Video applications.

HCI direct access

Used by licensees to customise HCI functionality. See RHCIDirectAccess.

Bluetooth Client Library Summary

Bluetooth Client Library (Bluetooth User) is a collection of helper APIs.

  • Bluetooth library

  • Audio / Video library

  • HCI commands

We will briefly look at each of the above components below.

Bluetooth library

Primarily this component provides Bluetooth sockets. There are two kinds of sockets, they are:

  1. ACL (CBluetoothSocket) and

  2. SCO (CBluetoothSynchronousLink) sockets.

DLL
Library
Profile
Protocol

bluetooth.dll

bluetooth.lib

GAP, SPP, GOEP, PAN

Bluetooth protocol stack

Bluetooth library classes

Bluetooth library provides classes to handle:

  1. Bluetooth Sockets

  2. Notifiers

  3. Utility classes

Audio / Video library

The Bluetooth Audio / Video library provides API classes to configure a system as defined by the AV profile.

DLL
Library
Profile
Protocol

bluetoothav.dll

bluetoothav.lib

AVRCP and GAVDP

AVCTP and AVDTP

Audio / Video library namespaces

The Bluetooth AV library provides the following namespaces:

Typical uses

We will look at common tasks associated with some of the Bluetooth User APIs here.

Task backgrounder

Before setting up a Bluetooth connection you need to think about the kind of connection needed and how best to go about setting up the connection. These topics will get you started.

  1. Connecting to Remote Devices

    This is a set of tutorial documents, the contents of which have been split up here according to main functionality grouping.

    • Selecting a Remote Device

      Discusses some of the issues about selecting a remote device that should be considered before writing any code.

Socket tasks

The following tutorial guides deal mainly with sockets.

  1. Connecting to Remote Devices

    • Inquiring About Remote Devices

      This tutorial shows you how to create a Bluetooth socket, make an inquiry for a remote device address and establish a connection to the remote device.

  2. Listening for Incoming Bluetooth Connections

    This tutorial shows you how to set up a Bluetooth socket to listen for a connect attempt by remote devices.

Notifier tasks

Notifiers are used to manage aspects of a Bluetooth connection.

  1. Connecting to Remote Devices

Utility tasks

These tasks show you how to do things like configure a local or remote device, access protocol level data and send HCI commands.

  1. Connecting to Remote Devices

  2. Handling the Local Device Name

    This code shows you how to set and get the local device name.

  3. Performing Low-level Configuration

    This tutorial introduces you to HCI, L2CAP and RFCOMM commands and options and shows you how to read the Class of device attribute on an L2CAP socket.

  4. Debugging the Host Controller

    This tutorial shows you how to issue vendor specific HCI commands via the stack.

  5. Disconnecting ACL links

    This tutorial shows you how to drop a remote device from a connection while leaving the socket up.

Audio / Video tasks

Currently there are no tutorials for the Audio / Video profiles.