![Symbian Developer Library](../../../../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
The Symbian OS Bluetooth Protocol Stack provides a software API that is used to configure and initialise the drivers, allowing the device to communicate with other devices over a Bluetooth® connection.
The Bluetooth protocol stack includes several protocol layers, as is shown in Bluetooth Stack PRT. As Bluetooth is a set of communication protocols that allow two or more devices to communicate over the air there must be a similar protocol stack on each device participating in the network. The Symbian OS Bluetooth stack provides APIs that enable the stack to be loaded when needed, to listen for an incoming connection request or to look for other Bluetooth devices. The Bluetooth stack is a simple concept that ensures any device wishing to establish a connection over the Bluetooth baseband is able to communicate with suitable devices.
This document is intended to be read by all developers although it references some APIs that are only available to licensee developers.
The Bluetooth stack is defined by the Bluetooth SIG in the "Draft Bluetooth Core Specification v2.1 + EDR 2" Part E "Host Controller Interface Functional Specification" section 1.1 "Lower Layers of the Bluetooth Software Stack", available from the Bluetooth specification documents page and other places.
Additionally, Symbian has produced several guides that may be useful for hardware implementers including:
The Base Porting Guide, where you can learn about:
Porting details for HAL.
The Device Driver Guide, where you can learn about:
The Symbian OS device driver model.
The following terms are introduced here and will be used throughout the Bluetooth stack documentation.
The various protocols work in such a way that they can be seen as a stack of protocols. Although some protocols exist on the same level in the stack, there are several levels that make up the stack. When talking about a layer we are talking about a level of this stack.
A mechanism for handling data.
Software that provides instructions to make a piece of hardware perform its intended function.
The Bluetooth stack is the most fundamental of all Symbian OS Bluetooth components. The stack configures the software and hardware so data can be managed and communicated as appropriate for the Bluetooth profile being used. The standard socket server framework is used to load the Bluetooth stack.
Note: that when using the Remote control framework the stack setup is handled in the background.
The Symbian OS Bluetooth subsystem is automatically configured from the settings given through the client server framework. You create a standard client server framework and configure it in such a way that when it is started the appropriate pieces are loaded. In a nut shell, you need to load the appropriate device drivers (See the Symbian OS device driver model for more) and the protocols using the standard client server framework to Load the Bluetooth stack.
There are three things that need to be configured to load the Bluetooth stack, they are the:
Physical Device Loader
Logical Device Loader
Protocol Loader
Individually each of these things represents a discrete aspect of the Bluetooth stack. Collectively they allow you to load the Bluetooth stack in the most appropriate way for your needs at the time. You will see by the end of this overview that there are many potential configurations for the Bluetooth stack and you will also know how to go about creating the configuration you need. We will have a closer look at each of the three parts here:
The physical device driver represents the transport layer of the stack.
UART
Allows the Bluetooth HCI to be used over a serial interface. This is the most common physical device configuration, and certainly the configuration any time the Bluetooth hardware module is built in to the phone.
The Symbian OS PDD_NAME
, used by
User::LoadPhysicalDevice()
is EUART1
.
RS-232
When the device is attached to the Bluetooth module using an RS-232 cable.
USB
When the device is attached to the Bluetooth module using a USB cable.
Windows Emulator
This is a special physical device driver used when testing code with the windows emulator.
The Symbian OS PDD_NAME
, used by
User::LoadPhysicalDevice()
is ECDRV
The physical device loader is provided by:
The logical device driver handles packaging the data coming from the protocol and sending it in an appropriate format to the physical device for transmission to the remote device.
ECOMM
The Symbian OS LDD_NAME
, used by
User::LoadLogicalDevice()
is ECOMM
.
The Logical device loader is provided by:
The following protocols can be loaded:
AVCTP - Audio Video Control Transport Protocol
AVDTP - Audio Video Display Transport Protocol
L2CAP
Link Manager
RFCOMM
SDP - Service Discovery Protocol
The protocol loader is provided by:
RSocketServ::StartProtocol()
There are only two tasks for the Bluetooth stack component; they are loading and unloading the stack.
Users of the Bluetooth stack component include:
Applications, such as a program to pair up to a printer when launched so the user can print to that printer as required. Other examples may include an application to automatically pair with a Bluetooth car kit when in the car or an application to automatically sync to a specific computer if it is in range. There are many possibilities, which of course is one of the main attractions of Bluetooth. This is done using the Bluetooth Manager UI helper APIs.
Symbian OS frameworks can be built in such a way as to integrate the stack loading functionality in their basic procedures. The Remote Control Framework is an example of this sort of system framework integration.
Plug-ins such as bt.prt
Please refer to the tutorials for more information.
The following tutorials are provided: