Chapter 4. The Cordless Telephony Profile

Introduction

The Cordless Telephony Profile provides the usage models described as the 3-in-1 phone. These new usage models accommodate general wireless telephony enabling Bluetooth solutions within the home or office environment. Bluetooth-enabled cordless handsets and multimedia PCs are all part of the 3-in-1 phone usage model allowing these devices to access a fixed telephone network, such as a Public Switched Telephone Network (PSTN) or an Integrated Services Digital Network (ISDN). It also extends the functionality already offered within a mobile phone, where short-range communication can be supported allowing the mobile phone to access similar fixed telephone networks; Figure 4-1 and Figure 4-2 illustrate the usage models supported by this profile.

A Bluetooth-enabled gateway is capable of supporting a connection from a cordless handset and a mobile phone.

Figure 4-1. A Bluetooth-enabled gateway is capable of supporting a connection from a cordless handset and a mobile phone.

A Bluetooth-enabled gateway is also capable of supporting a multimedia-enabled notebook or PC.

Figure 4-2. A Bluetooth-enabled gateway is also capable of supporting a multimedia-enabled notebook or PC.

Comparing Cordless Telephony with the Headset Profile

The Cordless Telephony and Intercom Profiles both depend upon the TCS; the Bluetooth Telephone Control Protocol Specification or the TCS-Binary (TCS-BIN), further shortened to TCS. This is discussed in some more detail in Section 4.5.1.3, The Telephony Control Protocol. In Figure 4-3, we compare the stack components that make up both the Cordless Telephony and Headset application types, where the Bluetooth protocol stack architecture can be compared and examined in more detail. As we previously mentioned, the Cordless Telephony Profile is based upon TCS and, as we can see from our illustration, the Headset Profile is dependent upon the implementation provided by RFCOMM. This provides the Headset with the AT Command Control and is implemented as the name suggests, through a series of AT Commands, which enable and control signalling.

The Cordless Telephony and Headset Profile protocol components are placed side-by-side to illustrate the differences in stack architecture.

Figure 4-3. The Cordless Telephony and Headset Profile protocol components are placed side-by-side to illustrate the differences in stack architecture.

In our new usage scenarios as illustrated in Figure 4-1 and Figure 4-2, all interacting devices make use of a base station or as the profile describes it a gateway; we will look at this role in more detail later. We can see that a headset device can equally lend itself to the role of a cordless handset, where audio transfer is made between the base station and the headset, in the same way it occurs for the cordless handset. However, it would require the headset to be compliant with the Cordless Telephony Profile (Figure 4-3), that is, have an implementation that encompasses TCS; moreover, a dual implementation of the AT Command Control and the Cordless Telephony may be considered, allowing the user to switch between usage scenarios. The implementation of this switch may be transparent, allowing the user to seamlessly move from one environment to another.

Usage Models

This section of the chapter now considers both existing and future usage models through scenarios that may be typical for the Cordless Telephony Profile. We begin by exploring the existing models, where, the 3-in-1 phone models is explored in further detail; in our future usage models section, we consider other scenarios where the Cordless Telephony Profile may benefit from other profile overlap as discussed in our earlier section.

Existing Usage Models

The scenarios provided in Figure 4-1 and Figure 4-2 represent our existing usage models. In the illustration a mobile phone, cordless handset and a multimedia notebook are shown. The same illustration also shows a gateway (GW), which may be connected to an external network such as a PSTN and an ISDN network. The GW also assumes responsibility for call set-up in both incoming and outgoing communication. It is possible for the gateway to accept multiple [1] connections from terminals (TLs); terminals represent the devices that support the Cordless Telephony Profile and include mobile phones, cordless headsets and multimedia PCs or notebooks as previously described.

In an attempt to understand the existing usage models, we begin first by considering the extended functionality provided by a mobile phone. This dual capability falls within the remit provided by a cordless handset, since the mobile phone will have the capability of connecting to the gateway to allow it to connect to the external network, thus avoiding the Global System for Mobile communications (GSM) Network. This, in turn, provides cheaper calls. The Cordless Handset usage model is simply the case of removing the need for cables. In many residential and office environments, we already witness the cordless handset model. Here, we are making the crossover to the Bluetooth model, which in turn, provides us with greater diversity for the applications we choose to develop.

In our last scenario, the multimedia notebook has the capability through a Bluetooth dongle [2] or an integrated Bluetooth system [3] of connecting to a gateway and providing it with speech through the built-in or externally connected speakers; outgoing communication is achieved through a microphone.

The gateway device is already capable of supporting up to seven users and, as such, its behaviour is very much like an access point, where multiple connections can be made to just the one unit. In an office environment, this could be extended such that roaming from one gateway to another may also be supported.

Future Usage Models

With an immediate continuation of the multimedia notebook scenario, we can easily identify the ability of a headset being used. Similarly, a headset supporting the Cordless Telephony Profile can be connected wirelessly to the gateway. In existing office environments, headsets are used with local [4] base-stations; as such, headsets provide the user the flexibility to move around and free their hands.

In the home environment, the availability of cordless handsets and a gateway can be extended to the home PC user, where an Internet connection can be established though the gateway. Of course, this would require that the Dial-up Networking Profile accommodates and integrates the Cordless Telephony Profile. Alternatively, the gateway could provide the ability as a LAN Access Point (LAP), see The LAN Access Profile, Chapter 10 or as a Network Access Point (NAP), see the PAN: An Overview, Chapter 16, to allow seamless connections to be achieved with your Internet Service Provider (ISP).

In our previous section, we mentioned the ability for a user to roam from one gateway device to another in an office environment. A more concrete example is that of a telephone receptionist. Often, a receptionist’s role is not just to answer telephone calls; they may also help with office administration. With a Bluetooth-enabled headset that supports the Cordless Telephony Profile, they can receive and make outing calls while they are attending to their administrative duties. With the limited functionality provided with the few buttons on the device, manufacturers may choose to develop a wireless button-operated device whose role would be to extend the functionality of the headset. This Bluetooth Headset-pad would allow the user to transfer calls between extensions and have a range of dialling options.

Profile Principles

The Cordless Telephony Profile provides two new roles: a Gateway (GW) and a Terminal (TL). The GW device is used as an endpoint, where it interfaces to the outside world over such technologies as PSTN or ISDN. It is capable of managing multiple connections from terminal devices, where speech and data services are provided to a cordless handset, mobile phone or multimedia PCs. In Figure 4-4, we can see how Cordless Telephony components are integrated with the existing Bluetooth protocol stack.

The core components of the Bluetooth protocol stack are shown and illustrate how the components of the Cordless Telephony Profile are integrated.

Figure 4-4. The core components of the Bluetooth protocol stack are shown and illustrate how the components of the Cordless Telephony Profile are integrated.

The profile defines a set of protocols and procedures, which are required to realise the profile implementation. Several feature definitions are provided enabling capabilities such as Calling Line Identification Presentation (CLIP), Connection Management and Dual Tone Multiple Frequency (DTMF); we will discuss more about these and other features later.

The GW must remain master of the piconet and all TLs must perform the master-slave switch, see Section 4.5.1.6.3, Master-Slave Switch, when configured for multi-terminal mode. Authentication and encryption are mandatory and should be used between TLs and the GW—as such, the procedures as described for authentication and encryption in the Generic Access Profile, Chapter 2 must be followed.

Table 4-1. The list of behavioural characteristics that are typical for this profile.

CONFIGURATION

ROLE

DESCRIPTION

DeviceA

TL

A device acting as a terminal, which may take the form of a mobile phone or cordless handset. In this particular context, the device is described as initiating the connection with the accepting device.

Initiator

This configuration describes the device that instigates the original connection or the device that wishes to initiate communication over an existing link.

DeviceB

GW

A device that behaves as a gateway, where it manages incoming and outgoing external communication. It is also the party that accepts incoming connections from the terminal. The gateway may also instigate a connection with a terminal, where the terminal will take on the role of acceptor.

Acceptor

This configuration describes the process of the device accepting the initiated communication from DeviceA.

In Table 4-1, clarification is provided with regard to the roles used within the context of this profile. In general, DeviceA represents the initiating party and DeviceB represents the accepting party. The terms are often used interchangeably, when describing specific operations in various contexts. They are provided here for reference.

The Cordless Telephony Profile does operate master-slave switching and either the GW or TL may initiate the connection. As such, the initiating party is referred to as DeviceA or the initiator. DeviceB is the acceptor. Any device in this party may initiate a connection, but the GW must remain the master if it is configured for multi-terminal support.

User Expectations

The Cordless Telephony Profile is dependent upon the underlying profiles, where Connection Establishment procedures are applicable and are illustrated in the Generic Access Profile, Chapter 2. The connection establishment procedures encompass the availability of an initialised and configured L2CAP connection. If the device is in Park [5] Mode, then the device is unparked prior to any creation of a Synchronous Connection Orientated (SCO) connection; if no previous session exists, then one is created and the device may request parked status. Therefore, it is assumed that the GW and TL devices have previously performed an inquiry, discovery and any authentication and encryption.

The sequence of events that occur during a typical call establishment.

Figure 4-5. The sequence of events that occur during a typical call establishment.

With multi-terminal support enabled, the gateway is capable of supporting up to seven devices. With multiple devices connected, this establishes a Wireless User Group (WUG). Only three active voice communication links can be active, which is due to the limitations of bandwidth imposed by the nature of SCO.

An incoming call from the external network will generate an audible alert, notifying the user of an incoming connection; CLIP is used to identify the incoming caller. The user may now accept or reject the call by operating the buttons available on the cordless handset. With a multimedia notebook, specific software for the cordless telephony application may be used to accept or reject the caller by operating a menu-driven user interface.

A user may initiate an outgoing call by operating the buttons available on the cordless handset. If a TL loses a connection with the GW, as a result of moving out of radio range, then the GW will attempt to re-establish the original connection by regularly paging the TL device.

Lifting the Lid

Dependencies

We have previously explored both existing and future usage models, but we now take an opportunity to consider the dependencies that make up this particular profile in greater depth. In Figure 4-6, we provide a conceptual illustration representing the dependencies that make up the Cordless Telephony Profile; the areas that are shaded are relevant to this profile. As you can see, the profile depends upon the basic functionality offered to us by the Generic Access Profile, Chapter 2, the Service Discovery Application Profile, Chapter 3 and the Telephony Control Protocol. The basic functionality, along with any variations occuring within it, are now discussed as we take a closer look at the basic requirements of the dependent components.

The dependent components of the Bluetooth protocol stack that make up the Cordless Telephony Profile. The areas that are shaded are relevant to this profile.

Figure 4-6. The dependent components of the Bluetooth protocol stack that make up the Cordless Telephony Profile. The areas that are shaded are relevant to this profile.

Generic Access

The capabilities of the Cordless Telephony Profile are provided by the Generic Access Profile, Chapter 2. Earlier we learned that a level of basic functionality is achieved through establishing a set of rules and procedures. These specifically relate to a device’s connectivity, discoverability and common characteristics at the user interface level, with some additional emphasis provided for security. By establishing a commonality between products through these rules and procedures, we are able to provide achieve a cohesive user experience. This section now takes an opportunity to reflect upon the behavioural aspects of Bluetooth-enabled devices as outlined by the Generic Access Profile.

In Table 4-2, the basic set of procedures is illustrated identifying functional expectations, which in turn govern operation. These procedures help determine the context that the device would operate in—for example, a device may wish to be discoverable for a period of time or it may require a level of security that differs from one device to another depending upon the services it is capable of offering.

In Table 4-3, we consider the specific set of operations that are required for this profile. In the table, you will notice features are marked with M (Mandatory), O (Optional), X (Excluded), C (Conditional) and N/A (Not Applicable); this will determine what is expected from the features of the Generic Access Profile.

Table 4-4 identifies the security requirements for this profile. You will also notice that these features are marked in a similar fashion to the previous table. Remember that Security Mode 1, is a non-secure mode where Bluetooth-enabled devices will never initiate any security procedures; whereas, Security Modes 2 and 3, initiate different levels of security procedures at various stages of connection establishment. In this instance, the profile mandates that support should be provided for at least Security Mode 2 or 3.

Table 4-2. The core set of procedures as required by most profiles.

PROCEDURES

DESCRIPTION

Discoverability Mode

This mode prescribes the overall discoverability of a device, allowing it to be placed into a non-discoverable, limited or general discoverable mode. The mode would allow devices to become generally available to other users or it can be restricted to personal use.

Connectability Mode

When determining a baseband connectable state, this mode is used to place a device into a connectable or non-connectable mode.

Pairing

Pairable and non-pairable modes are used to realise the security aspects when operating or intending to use a device. A device may require authentication and, as such, the user would be required to enter a Bluetooth Passkey. The pairing procedure starts the link key generation process, which in turn allows authentication to take place.

Table 4-3. The illustration shows specific modes of operation that this profile depends upon to realise its compliant implementation.

MODES

TL

GW

Non-discoverable

N/A

M

Limited Discoverable

N/A

O

General Discoverable

N/A

M

Non-connectable

N/A

X

Connectable

N/A

M

Non-pairable

M

M

Pairable

O

M

In our final consideration of the basic rules and procedures required from the Generic Access Profile, the idle mode procedures outline behavioural characteristics when DeviceA chooses to initiate them against DeviceB. The procedures listed in Table 4-5 provide a clear indication of how a device should operate when performing such an activity.

In summary, we can conclude that there are a specific set of events associated with a procedure. For an in-depth look at how procedure is conducted, refer back to the Generic Access Profile, Chapter 2.

The mechanisms for providing device discoverability are the provision of a well structured FHS packet, which is shown in Figure 4-7. This packet is used to identify the remote device, where information such as Bluetooth Device Address (BD_ADDR) and clock offsets is determined. You may also notice from this packet that the Class of Device (CoD) field is also provided. This information is relayed to the user interface, which in turn provides common characteristics about discovered devices. The class of device is used during the discovery mechanism to learn more about the type of device and what it may be capable of providing. This structure of information is depicted in Figure 4-8 and is made up of 3-bytes (or 24-bits as shown). The following sections now consider the Cordless Telephony attributes, which will ultimately make use of the Service, Major and Minor Device Class fields.

The structure of the FHS packet used only for reference to illustrate the position of the Class of Device structure.

Figure 4-7. The structure of the FHS packet used only for reference to illustrate the position of the Class of Device structure.

The structure of the class of device, illustrating the Minor Device, Major Device and Service Class fields and their respective lengths.

Figure 4-8. The structure of the class of device, illustrating the Minor Device, Major Device and Service Class fields and their respective lengths.

Table 4-4. The illustration shows specific security procedures that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

Authentication

M

M

Security Mode 1

X

X

Security Mode 2

C

C

Security Mode 3

C

C

Table 4-5. The illustration shows specific behavioural procedures that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

General Inquiry

M

N/A

Limited Inquiry

O

N/A

Name Discovery

O

N/A

Device Discovery

O

N/A

Bonding

M

M

Service Class

This high-level form of defining a Bluetooth device identifies where in the Service Class field the Cordless Telephony Profile resides; see Table 4-6, which shows the category of service. In this instance, the category of service falls within Telephony.

Major Device Class

This high-level form of defining a Bluetooth device identifies where in the Major Device Class the Cordless Telephony Profile resides; see Table 4-7, which shows the major class grouping. Here, the category falls within phone, since a cordless handset or mobile phone may be used.

Minor Device Class

The Minor Device Class in this profile is used to convey further context for the setting within the major class grouping, see Table 4-8. Here, the bit may be set appropriately for Cordless to denote the type of device available to the user.

Service Discovery

In the Service Discovery Application Profile, Chapter 3, we introduced the characteristics of the mechanisms used to retrieve service information from a remote device. Typically, a client will initiate inquiry and discovery procedures as outlined in our previous section, to learn of the devices in radio range. A client would then make use of an application, which would embody the functionality of the underlying Service Discovery Protocol (SDP). The Service Discovery Application (SrvDscApp) uses an SDP Client to instigate a request to the remote device where the SDP Server will respond; as such, the TL and GW must employ the use of an SDP client and server, respectively, as illustrated in Table 4-9.

Protocol Data Units (PDUs) are used to instruct the SDP server to undertake browsing procedures and to retrieve service record information; you may recall that these PDUs carry payloads about requests containing AttributeIDs and AttributeValues describing what exactly is being sought. As we previously discussed, the client and server operate a request and response paradigm. SDAP will construct PDUs containing information relating to the AttributeID and AttributeValues, in turn instructing the server to carry out its operation. The various request and response PDUs that are required are shown in Table 4-10, where features indicated are described.

Table 4-6. The Service Class categorisation for the Cordless Telephony Profile.

 

SERVICE CLASS

23

22

21

20

19

18

17

16

15

14

13

Bit # of CoD

0

1

0

0

0

0

0

0

0

0

0

Telephony

Table 4-7. The Major Device Class for the Cordless Telephony Profile.

 

MAJOR DEVICE CLASS

12

11

10

9

8

Bit # of CoD

0

0

0

1

0

Phone

Table 4-8. The Minor Device Class for the Cordless Telephony Profile.

 

MINOR DEVICE CLASS

7

6

5

4

3

2

Bit # of CoD

0

0

0

0

1

0

Cordless

Table 4-9. As a minimum, the local device must support the use of a client application and the remote device must support the use of a server.

FEATURE

TL

GW

SDP Client

M

X

SDP Server

X

M

Table 4-10. The list of PDUs that are required for the operation of the Cordless Telephony Profile.

PDU

TL

GW

SDP_ErrorResponse

X

M

SDP_ServiceSearchRequest

M

X

SDP_ServiceSearchResponse

X

M

SDP_ServiceAttributeRequest

M

X

SDP_ServiceAttributeResponse

X

M

SDP_ServiceSearchAttributeRequest

O

X

SDP_ServiceSearchAttributeRequest

X

O

A service record is maintained for each service a device is capable of supporting and, as such, a Service Record Handle is created to uniquely identify this. The ServiceRecordHandle is a 32-bit unsigned integer and is stored on the SDP server. The service record shown in Table 4-11 identifies a GW device and provides a list of AttributeIDs, which ultimately would identify the service for the Cordless Telephony Profile. A minimum of two AttributeIDs are required to make a service record— these are ServiceRecordHandle and a ServiceClassIDList, which must contain at least one UUID.

Table 4-11. The list of mandatory and configurable items that make up this profile’s service discovery record.

ATTRIBUTE

DESCRIPTION

ServiceRecordHandle

With an AttributeID of 0x0000, this uniquely identifies this service record within the SDP server on the GW device.

ServiceClassIDList 
  ServiceClass0 
  ServiceClass1 

With an AttributeID of 0x0001, the following ServiceClass0 would contain the UUID for the Cordless Telephony and the ServiceClass1 would identify the Generic Telephony service classes. Their respective UUID values are summarised in Table 4-12.

ProtocolDescriptorList 
  Protocol0 
  Protocol1 

With an AttributeID of 0x0004, the following Protocol0 would contain a UUID for the protocol L2CAP, whereas in Protocol1 a UUID would contain the protocol identifier for TCS-BIN-CORDLESS. Their respective UUID values are summarised in Table 4-13.

BluetoothProfile
DescriptorList 
  Profile0 
    ParameterFor0 

With an AttributeID of 0x0009, the following Profile0 would identify the UUID for Cordless Telephony service class, which is summarised in Table 4-12. The ParameterFor0 accommodates the version number supported by this profile.

ServiceName

With a base AttributeID of 0x0006, this attribute has an offset of 0x0000. It is a configurable item and has an AttributeValue of a Text string, where its default setting is Cordless Telephony.

ExternalNetwork

With an AttributeID of 0x0301, this attribute identifies what external network the Cordless Telephony device currently supports. Table 4-14 summarises the type of networks available.

When browsing for services on the remote device, a local device constructs a search pattern using a Universally Unique Identifier (UUID). A UUID is a 128-bit value, which has been shortened for use within Bluetooth. The shortcut has been provided by first establishing a Bluetooth Base UUID, which we discussed in the Service Discovery Application Profile, Chapter 3.

The UUIDs that have been presented so far in this chapter are aliases and take the form of what is referred to as a 16-bit UUID or a 32-bit UUID, but in turn they all should refer to the 128-bit notation. These UUIDs have been assigned and can be referenced in the Bluetooth Special Interest Group, Bluetooth Assigned Numbers, v1.1, February 2001. For the search pattern to be successful, they all need to be converted to the 128-bit notation, since they will all be compared at this range. An arithmetic conversion algorithm is used to construct the 128-bit value.

Table 4-12 summarises the service class UUIDs used to identify the particular profile in use; this also correlates with the identification of the device during a device discovery procedure, as previously outlined in our earlier Section 4.5.1.1, Generic Access.

As part of the service record, the dependent underlying protocols are also identified. The local device retrieves this information, where it can fully understand the exact requirements needed to fulfil the service. The Cordless Telephony Profile is dependent on the protocols as shown in Table 4-13; the table also shows their associated UUID values.

The Cordless Telephony GW device is capable of supporting several externally connected networks, which are summarised in Table 4-14. The AttributeValue that would follow is an 8-bit unsigned integer used to uniquely identify the particular network; these values are also shown.

The Telephony Control Protocol

This section provides a more detailed introduction to the TCS protocol. The Cordless Telephony and Intercom Profiles both depend upon the implementation of the TCS. In Figure 4-9, we illustrate the placement of the TCS component and how it is architected and moulded into the Bluetooth protocol stack. We can also see how the AT Command Control is also incorporated within the same architecture, which we touched upon earlier. More specifically, the TCS is implemented over L2CAP, where other implementations, such as the Headset Profile, use the services provided by RFCOMM.

The complete architecture of the audio and telephony control illustrates how audio is integrated and managed within the Bluetooth protocol stack.

Figure 4-9. The complete architecture of the audio and telephony control illustrates how audio is integrated and managed within the Bluetooth protocol stack.

Table 4-12. The list of service classes that match a corresponding profile. This correlates with our previous Generic Access section.

CLASSES

UUID

CordlessTelephony

0x1109

GenericTelephony

0x1204

Table 4-13. The list of protocols that are used in this profile; their associated UUID values are also shown.

PROTOCOL

UUID

TCS-BIN-CORDLESS

0x0005

L2CAP

0x0100

With the provision of telephony applications coordinating the user interface characteristics, the TCS component is left to manage the audio communication effort and direct appropriate Asynchronous Connectionless (ACL) communication through the Bluetooth protocol stack, where numerous internal interfaces are identified. The TCS component has further entities within its architecture, which have been especially created to manage and coordinate activities of speech and data communication, which we will now describe in more detail.

Inter-operating Devices

In this section, we consider the operation of devices that interact using the TCS protocol and also examine how the various Bluetooth protocol layers interact. In our earlier discussion, we introduced the various usage models available to a user and, as such, the operation of these devices follow simple procedures.

TCS has both a single- and multiple-point available. In the former configuration, a single-point method is used to direct a call to a specific Bluetooth-enabled device whilst our latter configuration supports a multiple-point method to direct a potential call to numerous devices. The single-point configuration is mapped to a connection-orientated L2CAP channel, whereas a multiple-point method is mapped to a connectionless L2CAP channel.

Table 4-14. The list of externally connected networks that may be connected to a GW device.

NETWORK

VALUE

PSTN

0x01

ISDN

0x02

GSM

0x03

CDMA

0x04

Analogue Cellular

0x05

Packet Switched

0x06

Other

0x07

In Figure 4-10 and Figure 4-11 we provide a conceptual representation of Bluetooth-enabled devices interoperating using the TCS protocol. Figure 4-10 illustrates the single-point method, where a call request is used to notify the mobile phone of an incoming call and subsequently, the phone establishes the speech or data channel. In Figure 4-11, we illustrate the multiple-point method where in this particular instance, all devices are notified of the call request. We show that Cordless Handset B accepts the incoming call, where by a single-point signalling channel is created; both devices then establish a speech or data channel.

A Bluetooth-enabled gateway notifies the mobile phone of the call request, where a speech or data channel is subsequently created.

Figure 4-10. A Bluetooth-enabled gateway notifies the mobile phone of the call request, where a speech or data channel is subsequently created.

A Bluetooth-enabled gateway notifies the cordless handsets that are in radio range of the call request. Cordless Handset B, accepts the incoming call and creates a single-point signalling channel, then it creates a speech or data channel.

Figure 4-11. A Bluetooth-enabled gateway notifies the cordless handsets that are in radio range of the call request. Cordless Handset B, accepts the incoming call and creates a single-point signalling channel, then it creates a speech or data channel.

With the ability to manage single- and multiple-point communication between Bluetooth-enabled devices, a TCS architecture must reflect the capability to inherently coordinate simultaneous communication between peer devices. Each instantiation of a TCS component would be uniquely identified through the Channel Identifier (CID) of an L2CAP connection. This would allow communication to be directed accordingly for connected devices.

In Figure 4-12, we illustrate the conceptual architecture that is proposed for a TCS implementation. In it you will notice the entities that characterise the TCS component. The Call Control (CC), Group Management (GM), Connectionless (CL) and Protocol Discrimination entities have their own responsibilities in providing a telephony service; these are now identified in Table 4-15.

A conceptual illustration identifying the structure of the TCS component.

Figure 4-12. A conceptual illustration identifying the structure of the TCS component.

In our earlier discussion, we touched upon the fact that the Cordless Telephony and Intercom Profiles rely upon TCS to provide a telephony service. Our focus here is to describe the processes used to provide such a service and to establish how the underlying Bluetooth transport is facilitated in achieving this. In doing so, the reader will come to understand how the various types of scenarios are supported.

TCS has been designed to sit above the L2CAP component of the Bluetooth protocol stack. In our first look at understanding this protocol, we will examine how the TCS protocol is used to transport data between peer devices.

TCS Messaging Format and Coding

In Figure 4-13 we illustrate what is referred to as a TCS signalling message. In other protocols to be introduced in later chapters, varying terms are used to refer to the packet [6] used to transport a payload. [7] The signalling message has been adapted from the International Telecommunications Union (ITU) Telecommunications division, Q.391 Digital Subscriber Signalling System No. 1 (DSS 1) and ISDN User Network Interface Layer 3 Specification for Basic Call Control.

The structure of the signalling messaging as used within the Cordless Telephony Profile.

Figure 4-13. The structure of the signalling messaging as used within the Cordless Telephony Profile.

The structure of the message packet is constructed using two octets, which comprise a Message Type, Protocol Discriminator and an Information field. The Message Type field is used to describe the function or purpose of the message. It occupies the first 5-bits of the first octet. In our earlier discussion, we identified three core entities that are used to manage the various functions within TCS. As such, the Message Type values are depicted in accordance with the respective entity in Table 4-16 for Call Control, Table 4-17 for Group Management and finally Table 4-18 for Connectionless.

Table 4-15. The TCS protocol can be further broken down, where identifiable entities are used to coordinate and manage related activities.

ENTITY

RESPONSIBILITY

Connectionless

This entity is used to coordinate non-speech related activities. Where data may be passed between Bluetooth-enabled devices without the need for a speech call to be established.

Call Control

This entity coordinates and interfaces the connection and disconnection of speech and data calls between Bluetooth-enabled devices.

Group Management

When groups of devices are interacting, this entity manages the group effort as well as looking after such activities as paging and security. This particular entity is also responsible for coordinating effort between WUGs.

Protocol Discrimination

The protocol discrimination entity is responsible for correctly routing traffic between the entities that are responsible for it.

The various Message Type groups, that is CC, GM and CL, are identified with the Protocol Discriminator field, which is illustrated in Table 4-19. This is used to convey the local device’s intention to the remote peer device.

Table 4-16. The Message Type field for Call Control messages used within TCS.

 

MESSAGE TYPE (CC)

4

3

2

1

0

Bit # of Message Type field for Call Control

0

0

0

0

0

ALERTING

0

0

0

0

1

CALL PROCEEDING

0

0

0

1

0

CONNECT

0

0

0

1

1

CONNECT ACKNOWLEDGE

0

0

1

0

0

PROGRESS

0

0

1

0

1

SETUP

0

0

1

1

0

SETUP ACKNOWLEDGE

0

0

1

1

1

DISCONNECT

0

1

0

0

0

RELEASE

0

1

0

0

1

RELEASE COMPLETE

0

1

0

1

0

INFORMATION

1

0

0

0

0

START DTMF

1

0

0

0

1

START DTMF ACKNOWLEDGE

1

0

0

1

0

START DTMF REJECT

1

0

 

1

1

STOP DTMF

1

0

1

0

0

STOP DTMF ACKNOWLEDGE

The final field of the signalling message is the Information field; it contains data relevant to the type of function, which is specific to the Message Type field. The Information field is further categorised into three informational elements, which are constructed using 1-byte, 2-byte or of a variable length field. In Figure 4-14, we illustrate the construction of a 1-byte Information field, whereas Figure 4-15 illustrates a 2-byte construction.

A 1-byte Information field used in the Signalling Message.

Figure 4-14. A 1-byte Information field used in the Signalling Message.

A 2-byte Information field used in the Signalling Message.

Figure 4-15. A 2-byte Information field used in the Signalling Message.

In Figure 4-16, we can see the construction of a variable Information field, where the Length field indicates the total length of the data to follow in the Contents field. In all our illustrations of the Information field, a Flag field is used to denote the category of information being carried. If the Flag field is set to 1, then this would indicate that a fixed 1- or 2-byte Information field follows, whereas a Flag field set to 0, would indicate that a variable Information field follows.

A variable length Information field used in the Signalling Message.

Figure 4-16. A variable length Information field used in the Signalling Message.

Table 4-17. The Message Type field for Group Management messages used within TCS.

 

MESSAGE TYPE (GM)

4

3

2

1

0

Bit # of Message Type field for Group Management

0

0

0

0

0

INFO SUGGEST

0

0

0

0

1

INFO ACCEPT

0

0

0

1

0

LISTEN REQUEST

0

0

0

1

1

LISTEN ACCEPT

0

0

1

0

0

LISTEN SUGGEST

0

0

1

0

1

LISTEN REJECT

0

0

1

1

0

ACCESS RIGHTS REQUEST

0

0

1

1

1

ACCESS RIGHTS ACCEPT

0

1

0

0

0

ACCESS RIGHTS REJECT

Table 4-18. The Message Type field for Connectionless messages used within TCS.

 

MESSAGE TYPE (CL)

4

3

2

1

0

Bit # of Message Type field for Connectionless

0

0

0

0

0

CL INFO

Table 4-19. The Protocol Discriminator field and its usage within TCS.

 

PROTOCOL DISCRIMINATOR

7

6

5

Bit # of Protocol Discriminator field

0

0

0

Call Control

0

0

1

Group Management

0

1

0

Connectionless

Table 4-20 illustrates the various information element codings available for the Identifier field. Recall that the Flag field denotes 1-byte, 2-byte or a variable length, which are also indicated in the table.

The Contents field transports data relevant to the current activity, as indicated in Table 4-20. In the following sections, we provide two examples of how coding is achieved in the Information field. Our first example, Figure 4-17 illustrates the structure of the Call Class coding.

A 2-byte Information field, which in this example contains data relevant to the call class.

Figure 4-17. A 2-byte Information field, which in this example contains data relevant to the call class.

For the call class structure, the Flag field would be set to 1, indicating that it is a 1-or 2-byte Information field. The Identifier field would be set to the value, as indicated in Table 4-20. The values available to the Contents field, which constitutes the call class specific data, would have the values identified in Table 4-21 available to it.

In our second example, the Destination CID coding is used to locate the established L2CAP channel with the remote peer device. You may recall that a Bluetooth-enabled device may communicate and connect to a number of devices. As such, the CID of the L2CAP channel is used to uniquely identify and route the traffic accordingly.

For the destination CID structure, the Flag field would be set to 0, indicating that it is a variable length Information field. The Identifier field would be set to the value as indicated in Table 4-20 and the destination CID specific data, would contain the destination CID of the active connection. In Figure 4-18, the Length field would be set to 2, since the destination CID is constructed using 2-bytes.

A variable-length Information field, which in this example contains data relevant to the destination CID.

Figure 4-18. A variable-length Information field, which in this example contains data relevant to the destination CID.

During the exchange of signalling messaging, a message will be ignored if a Protocol Discriminator field is present or if the message is too short or unrecognised. When a message is delivered unexpectedly, the TCS component will not be in an appropriate state to receive such a message then this too will be ignored.

Table 4-20. The available codings for the Identifier field.

 

CONTENTS

6

5

4

3

2

1

0

Bit # of Contents field

0

1

0

0

0

0

1

Sending Complete (Single Byte)

1

0

0

0

0

0

0

Call Class (Double Byte)

1

0

0

0

0

0

1

Cause (Double Byte)

1

0

0

0

0

1

0

Progress Indicator (Double Byte)

1

0

0

0

0

1

1

Signal (Double Byte)

1

0

0

0

1

0

0

Keypad Facility (Double Byte)

1

0

0

0

1

0

1

SCO Handle (Double Byte)

0

0

0

0

0

0

0

Clock Offset (Variable)

0

0

0

0

0

0

1

Configuration Data (Variable)

0

0

0

0

0

1

0

Bearer Capability (Variable)

0

0

0

0

0

1

1

Destination CID (Variable)

0

0

0

0

1

0

0

Calling Party Number (Variable)

0

0

0

0

1

0

1

Called Party Number (Variable)

0

0

0

0

1

1

0

Audio Control (Variable)

0

0

0

0

1

1

1

Company Specific (Variable)

Table 4-21. The Call Class values that form part of the Contents field.

 

CALL CLASS

1

0

Bit # of Call Class forming the Contents field

0

0

External Call

0

1

Intercom Call

1

0

Service Call

1

1

Emergency Call

TCS in the Cordless Telephony Profile

In Section 4.5.1.3, The Telephony Control Protocol, we leaned about how signalling messages are created and subsequently constructed to provide us with a telephony service. It showed us how we could construct a series of signalling messages which, in turn, are used to achieve an end-function. In this section, we now consider the objectives and expectations of TCS in the profile.

Call Control

In Table 4-15 we identified the responsibilities of the CC entity. Its primary responsibility is to coordinate the connection and disconnection of speech and data calls between the TL and GW. In Table 4-22, we illustrate the set of Call Control procedures that are required to achieve a compliant Cordless Telephony Profile.

Supplementary Service

In Table 4-23, we illustrate the set of Supplementary Services that can be made available internally or externally.

Group Management

In Table 4-15 we identified the responsibilities of the GM entity. Its primary responsibility is to manage group effort between the TL and GW and to coordinate effort for WUGs. In Table 4-24, we illustrate the set of Group Management procedures that are required to achieve a compliant Cordless Telephony Profile.

Table 4-22. The illustration shows specific Call Control procedures that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

Call Class

M

M

Call Request

M

M

Overlap Sending

M

M

Call Proceeding

M

M

Call Confirmation

M

M

Call Connection

M

M

Non-selected User Clearing

M

M

In-band Ring Tones and Announcements

M

M

Failure of Call Establishment

M

M

Call Clearing

M

M

Call Information

M

M

Table 4-23. The illustration shows specific Supplementary Services that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

DTMF Signalling

M

M

Caller Line Identity

M

M

Register Call

M

M

L2CAP

The L2CAP layer provides transparency for the upper layers of the stack from the layers typically found within the host controller. L2CAP payloads are passed to the Host Controller Interface [8] (HCI), which is then subsequently passed onto the Link Manager Protocol (LMP). The range of upper layers, which include RFCOMM, SDP and TCS all make use of the capabilities offered to us by L2CAP. Its primary role is to provide protocol multiplexing, allowing numerous simultaneous connections to be made and also providing the ability for segmentation and reassembly. This refers to the ability to manage large payloads in the application, which may need to be fragmented into smaller payloads for the lower layers to manage; these are then transmitted over the air-interface. Finally, the L2CAP layer exchanges Quality of Service (QoS) information, ensuring that sufficient resources are available and that both Bluetooth devices are attaining the best service.

In Table 4-25, we summarise the broad capabilities that are expected from L2CAP and in the table you will notice features are marked with M (Mandatory), O (Optional), X (Excluded), C (Conditional) and N/A (Not Applicable); these determine what is expected from the L2CAP layer.

Channel Types

In Table 4-25, we identify that both the Connection-orientated and Connectionless Channels are mandatory; the connectionless channel is aimed at broadcasting, where only the GW will support this feature. L2CAP uses PDUs to transport connection, signalling and configuration options, which will be discussed shortly. The higher layers of the Bluetooth protocol stack will instigate a connection with L2CAP using the L2CA_ConnectReq request packet, where the corresponding result is contained within the L2CA_ConnectRsp response packet. An L2CA_ConnectRspNeg negative response packet is used to denote a response, where the connection with the remote device was unsuccessful. Since our profile resides above L2CAP and employs its services, we are only concerned with the upper protocol layer of L2CAP. This higher functionality is offered to us through a series of L2CAP events and is denoted through the prefix L2CA_; see Table 4-26.

Table 4-24. The illustration shows specific Group Management procedures that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

Obtain Access Rights

M

M

Configuration Distribution

M

M

Periodic Key Update

M

M

Faster Inter-member Access

M

M

Table 4-25. The illustration shows specific procedures that this profile depends upon to realise its compliant implementation.

PROCEDURE

TL

GW

Connection-orientated Channel

M

M

Connectionless Channel

M

M

Connection Establishment

M

C

Configuration

M

M

Connection Termination

M

C

Echo

M

M

Command Rejection

M

M

Maximum Transmission Unit

M

M

Flush Timeout

M

M

Quality of Service

O

O

When creating an L2CAP connection between two devices, a Protocol/Service Multiplexor (PSM) value is used to denote the higher-layer protocol that is using the connection; Table 4-27 identifies these values and the corresponding protocol they represent. The value of 0x0007 (TCS-BIN-CORDLESS) is used for this profile.

Signalling

When establishing communication with a remote device, a signalling channel is created and reserved for use during connection, disconnection and configuration of subsequent L2CAP connections. A channel is used to describe the communication and data flow that exists between L2CAP entities and Table 4-28 illustrates the range of that are used to identify the channel type. As we can see in Table 4-25, Connection Establishment and Termination is mandatory in the local device, although the remote device may be capable of initiating and terminating a connection to the local device. The L2CA_DisconnectReq request packet is used to terminate the connection with the remote device and an L2CA_DisconnectRsp response packet is used to ascertain the result of the termination, although all disconnection requests must be completed successfully. The support of Configuration is shown as mandatory and we will discuss these specific options in more detail in the following section. Finally, Echo and Command Rejection are both mandatory for a compliant Cordless Telephony Profile.

Table 4-26. The range of prototypes used to illustrate how L2CAP is architected and how interaction between higher and lower layers is achieved. For this discussion, our concern here is with the higher-layer.

PROTOTYPE

DESCRIPTION

L2CA_

This prefix prototype is used to denote the higher-layer interaction, typically used by RFCOMM, SDP and TCS.

L2CAP_

This prefix is used to denote peer-to-peer signalling interaction of L2CAP entities.

LP_

Finally, this prefix denotes lower-layer interaction, where L2CAP interfaces with the LMP layer.

Configuration Options

In establishing a connection with the remote device, the channel is subject to configuration and the higher-layer prototype L2CA_ ConfigReq request packet is used to carry configuration requests. Its associated response is contained within the L2CA_ConfigRsp packet; an L2CA_ConfigRspNeg packet is used to denote a negative response during configuration, where the suggested Maximum Transmission Unit (MTU) is too large. In Table 4-25, we identify that the MTU and Flush Timeout parameters are mandatory, whereas the QoS is optional.

The default MTU setting for the signalling channel is 48 bytes, whereas other channels may be capable of transferring larger payloads; essentially the MTU determines the size of payloads that are capable of being exchanged between two devices. The Cordless Telephony Profile requires that a minimum MTU of 171-bytes should be established to allow support for multiple TLs. During configuration, the local device will inform the remote device that it is potentially capable of accepting larger payloads. If the remote device is unwilling to accept a larger MTU, then the local device is informed with the response contained within the L2CA_ConfigRspNeg packet.

Table 4-27. The PSM values that are used to identify the higher-layer protocol.

PSM

DESCRIPTION

0x0001

SDP

0x0003

RFCOMM

0x0005

TCS-BIN

0x0007

TCS-BIN-CORDLESS

Table 4-28. The CIDs that are used to represent the logical channel.

CID

DESCRIPTION

0x0000

Null

0x0001

Signalling Channel

0x0002

Connectionless Reception Channel

0x0003 to 0x003F

Reserved

0x0040 to 0xFFFF

Dynamically Allocated

When L2CA_ request and response packets are being exchanged, the Flush Timeout parameter is used to determine how long the local device is prepared to continue to transmit an L2CAP fragment before it gives up; the packet is subsequently flushed (or in other words discarded). The suggested Flush Timeout value is sent during the L2CA_ ConfigReq request packet. However, if no value is set, then the default value is used. The Cordless Telephony Profile uses the default value of 0xFFFF.

As we have already mentioned, the QoS configuration is optional. If it is used during an L2CA_ConfigReq request, then the best effort service is established as a default. The available services that are supported for an L2CAP channel are shown in Table 4-29. However, if the QoS service is set at Guaranteed, then parameters such Token Rate, Token Bucket, Peak Bandwidth, Latency and Delay Variation, are used to determine an acceptable guaranteed service, where the L2CA_ConnectRspNeg, will indicate that these values are unacceptable. These parameters are then subject to further negotiation.

Table 4-29. The range of service definitions that are used during QoS.

SERVICE

DESCRIPTION

No Traffic

This indicates that the channel will not be sending any traffic and, as such, any parameters can be ignored.

Best Effort

This default value attempts to achieve a minimum service with the remote device, where no guarantees are offered.

Guaranteed

With this service definition, we indicate that we wish to achieve the maximum bandwidth permitted—this is, of course, subject to the nature of a wireless environment.

Link Manager

The Link Manager (LM) layer sits between the HCI and the Link Controller (LC), although on a hostless system the LM will have direct interaction with L2CAP. It accepts commands from HCI and translates them into operations for the LC, where ACL and SCO links are created and established. It is during this stage of ACL and SCO establishment that a master-slave switch would be performed as governed by the requirements of this profile. The LM is also responsible for placing the device into a low-power mode, which includes hold, sniff and park.

In providing general error management, devices that operate mandatory procedures during interoperability, must either acknowledge their support or provide a suitable reason for failure. The LMP_Detach PDU is used to inform the device of the error that occurred; typically, the reason unsupported LMP feature (0x1A) is reported, see Appendix A.

In the following discussion, we take an opportunity to explore the dependencies that make up the Cordless Telephony Profile where we provide a narrative of the capabilities that are expected at this level. In Table 4-30, we identify the capabilities that are required from this layer and in the following subsections discuss the specific procedures in more detail.

Capabilities

Table 4-30 summarises the broad capabilities that are expected from the LM. In the table, you will notice procedures are marked accordingly; this will determine what is expected from the procedures at the LM. What has been included in the table is a set of deviations that the profile requires, which is above the common set of procedures expected at LM.

Table 4-30. The mandatory requirements that are required for a compliant Cordless Telephony Profile. As the table shows, support for encryption and SCO links for this profile are now mandatory.

PROCEDURES

SUPPORT

Encryption

M

Master-slave Switch

M

Park Mode

M

SCO Links

M

Encryption

Encryption is mandatory for this profile and, as such, a summary of the activities that occur during this process is now provided; more detailed information can be found in the Generic Access Profile, Chapter 2. Once both devices have agreed to undertake encryption, which occurs after the authentication process, DeviceA (or master) takes the initiative and needs to determine whether to include encryption for point-to-point or broadcast communication. If DeviceB (or slave) is agreeable to the parameters offered by the master, the master proceeds to communicate further detailed information about the encryption parameters.

As previously mentioned, the actual process is invoked when the two parties agree to use encryption, where subsequent L2CAP communication terminates. The master then sends the LMP_encryption_mode_req command. If this is acceptable to the slave, it too terminates all L2CAP communication and responds with the LMP_ accepted command. The next step in this process actually determines the size of the encryption key and it is the master that sends the LMP_encryption_key_size_req command, where it offers an initial recommendation of the key size to use. For this profile to be compliant, the initial recommendation offered is five octets. The slave, in turn, then offers its own recommendation, where it informs the master what it thinks it might be capable of—nevertheless, the minimum recommended size must be initially offered. Both master and slave will repeat this process until they reach an agreement; however, if neither party reaches a decision, then the LMP_not_accepted command is sent, offering the reason as unsupported parameter value (0x20), see Appendix A.

Upon accepting the key size, the LMP_accepted command is issued and the encryption procedure then takes place by issuing the LMP_start_encryption_req command with a random number, which is used to calculate the encryption key. Table 4-31 summarises the available commands for the encryption process.

Master-Slave Switch

The master-slave switch operation is required [9] when the GW is configured for multi-terminal [10] support. The failure of a TL to perform this operation prohibits the successful connection to a GW. Figure 4-19 provides an illustration of the events that occur when the TL successfully performs the master-slave switch request [11].

The events that take place during a master-slave switch.

Figure 4-19. The events that take place during a master-slave switch.

Table 4-31. The range of LMP PDUs available for encryption.

PDU

PARAMETER

LMP_encryption_mode_req

Encryption Mode

LMP_encryption_key_size_req

Key Size

LMP_start_encryption_req

Random Number

LMP_stop_encryption_req

None

Table 4-32 provides the HCI command and event combination that are used to perform the master-slave switch operation between the TL and GW. This table represents one such method of performing a switch, where other HCI commands, such as the HCI_Create_Connection command, specify the same request as part of their parameter set-up. In this instance, the Allow_Role_Switch parameter is used during the connection establishment to determine if a switch can be performed by the local device, that is, the device initiating the connection (DeviceA). The remote device (DeviceB) is duly notified with its corresponding HCI command, Accept_Connection_Request of whether it can be supported.

Table 4-33 provides the two LMP general response messages, which are mandatory for this profile. During an LMP_accepted operation, the response contains the OpCode of the operation that was successful; whereas the response from the LMP_not_ accepted provides the OpCode of the operation that was not successful. Accompanying this OpCode, a reason or error code is provided to help to determine why the operation failed; a full list of LMP reasons can be found in Appendix A.

Table 4-32. The command and two-stage event notification that are used in combination to perform the master-slave switch.

COMMAND

PARAMETERS

HCI_Switch_Role

BD_ADDR

Role

EVENT

PARAMETERS

Command_Status

Status

Num_HCI_Command_Packets

Command_OpCode

Role_Change

Status

BD_ADDR

New_Role

There general response messages are used in combination with the following LMP role-switch specific messages, which are shown in Table 4-34. We will now explore the behaviour of both these devices when performing the master-slave switch operation. You may remember from our earlier discussion that both the TL and GW are capable of initiating a connection.

When DeviceB (or slave) initiates a master-slave switch, it terminates the final ACL packet and stops any further L2CAP transmissions. It then sends LMP_slot_offset command immediately followed by the LMP_switch_req command. Similarly, if the master accepts the master-slave switch, it terminates all L2CAP transmissions and then issues an LMP_accepted command, if the transaction is a success. However, if the operation is rejected, then an LMP_not_accepted command is provided as the response, with a specific reason for its failure. Furthermore, when the operation has been completed, despite its success or failure, L2CAP communication is resumed.

Table 4-33. The general response messages used within LMP.

PDU

PARAMETERS

LMP_accepted

OpCode

LMP_not_accepted

OpCode

Reason

Table 4-34. The PDUs available within LMP that are responsible for managing the role-switch behaviour.

PDU

PARAMETERS

LMP_switch_req

Switch instant

LMP_slot_offset

Slot Offset

BD_ADDR

When DeviceA (or master) initiates a master-slave switch, it terminates the final ACL packet and stops any further L2CAP transmissions before sending an LMP_ switch_req. Similarly, if the slave accepts the master-slave switch, it terminates all L2CAP transmissions and then issues an LMP_slot_offset command immediately followed by an LMP_accepted command. However, if the operation is rejected, then an LMP_not_accepted is provided as the response, with a specific reason for its failure. Furthermore, when the operation has been completed, despite its success or failure, L2CAP communication is resumed.

Supporting Park Mode

The recommended power saving mode for this profile is Park Mode and is indicated as mandatory in the summary of capabilities as shown in Table 4-30. When a device participates in this mode, it will relinquish its Active Member Address (AM_ADDR) and then is assigned two new addresses, as shown in Table 4-35.

In its effort to reduce power consumption, the device will no longer participate in a piconet or be addressed by the master. During periodical intervals, the device will listen for broadcasts to allow it to become an active member of the piconet again. In Table 4-36, we identify the HCI commands that are used to place a device into this mode. Placing a device into park mode will modify the behaviour of the LM, where the Connection_ Handle parameter of an ACL link identifies the specific connection that has to be placed into this mode. The Beacon_Min_Interval and Beacon_Max_Interval parameters inform the device when to periodically listen for broadcasts. It is noted that no active SCO connections are permitted during the operation of park mode; if one exists then an error Command Disallowed will be returned by the Command_Status event, see Appendix B for a list of HCI errors and reasons.

Table 4-35. When a device is placed into park mode, it releases its current AM_ADDR and is assigned two new addresses as shown.

ADDRESS

DESCRIPTION

PM_ADDR

The Parked Member Address is an 8-bit value identifying the parked slave and is also used to unpark the slave in a master-initiated unpark procedure.

AR_ADDR

The Access Request Address is an 8-bit value identifying the parked slave and is also used to unpark the slave in a slave-initiated unpark procedure.

Table 4-36. The command and two-stage event notification that are used in combination to place the device into park mode.

COMMAND

PARAMETERS

HCI_Park_Mode

Connection_Handle

Beacon_Max_Interval

Beacon_Min_Interval

EVENT

PARAMETERS

Command_Status

Status

Num_HCI_Command_Packets

Command_OpCode

Mode_Change

Status

Connection_Handle

Current_Mode

Interval

When a device wishes to exit park mode, then the HCI command, as identified in Table 4-37, is used to bring the device back into active mode. The Connection_ Handle parameter of an ACL connection is used to identify the specific connection that wishes to be returned to active mode.

General response messages, as previously illustrated, are used in combination with the following LMP park mode specific messages; these are summarised in Table 4-33.

During the operation of park mode, the master may request that the slave enter the low-power saving mode. All communication at the L2CAP level is finalised and the LM then issues the LMP_park_req PDU. Similarly, the slave finalises its communication at L2CAP and responds with the LMP_accepted PDU. When both devices have agreed to engage park mode, the slave relinquishes its AM_ADDR. However, if the slave rejects park mode, it will respond with LMP_not_accepted and communication will recommence. The slave may also request that it enter park mode, where similar actions are carried out during this procedure.

Table 4-37. The command and two-stage event notification that are used in combination to place the device into active mode.

COMMAND

PARAMETERS

HCI_Exit_Park_Mode

Connection_Handle

EVENT

PARAMETERS

Command_Status

Status

Num_HCI_Command_Packets

Command_OpCode

Mode_Change

Status

Connection_Handle

Current_Mode

Interval

Table 4-38. The PDUs available within LMP that are responsible for managing the parking behaviour.

PDU

PARAMETERS

LMP_park_req

PM_ADDR

AR_ADDR

Access_Schemes

LMP_unpark_PM_ADDR_req

AM_ADDR

PM_ADDR

Timing_Control_Flags

LMP_unpark_BD_ADDR_req

AM_ADDR

BD_ADDR

Timing_Control_Flags

Table 4-39. The command and events that are used in combination to create a SCO connection. The host controller first sends the Command_Status event, but when the connection has been established, the Connection_Complete event is generated on both devices.

COMMAND

PARAMETERS

HCI_Add_SCO_Connection

Connection_Handle

Packet_Type

EVENT

PARAMETERS

Command_Status

Status

Num_HCI_Command_Packets

Command_OpCode

Connection_Complete

Status

Connection_Handle

BD_ADDR

Link_Type

Encryption_Mode

SCO Links

A SCO link is set-up using the HCI_Add_SCO_ Connection command (see Table 4-39), where a series of Voice_Setting parameters are used to denote the type of SCO channel and the audio coding schemes. The Voice_Setting parameters are written using the HCI_Write_Voice_Setting command and are shown in Table 4-40.

It assumed that the partying devices have an existing ACL communications link, where pairing, authentication and encryption have already taken place. The ACL Connection_Handle parameter is used, in part, to then create our SCO connection using the HCI_Add_SCO_Connection command. Although the host controller generates a Command_Status event, it does not indicate that the SCO connection has been created. The host controller for both devices uses the Connection_Complete event to notify both hosts whether the SCO connection has been successful or not, where the new Connection_Handle and Link_Type identify the new connection. You may also wish to note that the Packet_Type parameter is used to specify the type of high quality voice transmission, where HV1, HV2 or HV3 can be requested over the SCO link.

Table 4-40. The command and events that are used in combination to write the voice setting parameters for a SCO link.

COMMAND

PARAMETERS

HCI_Write_Voice_Setting

Voice_Setting

EVENT

PARAMETERS

Command_Complete

Num_HCI_Command_Packets

Command_OpCode

Return_Parameters

The Voice_Setting parameters are shown in more detail in Table 4-41, the parameter makes use of two bytes, but only the first ten bits are useful. The HCI_Write_ Voice_Setting command also returns a Status of whether the command succeeded or not. The Voice_Setting parameters define the behaviour of all SCO connections that are active between partying devices.

Link Controller

The LC layer is the lowest layer depicted in the dependencies of this profile and is responsible for a large number of core capabilities. It manages air to interface transactions and determines the fundamental timing of ACL and SCO data packet transmission and reception, as well as coordinating effort at its upper-edge with the LM. It also encompasses the management of the various packet types and the various inquiry and paging procedures that are available. The following subsections now consider the capabilities that are a requirement at the LC level for the Cordless Telephony Profile. In our understanding of the dependencies, we begin by further examining the supported capabilities. If you are a developer providing profile-specific applications, then it is unlikely that you will engage in a large part of this component, although in some audio-related applications direct access may be required, where a faster transport mechanism can be supported. Nevertheless, many manufacturers have architected an audio-specific Application Programming Interface (API) for intelligible access to this component.

Table 4-41. The Voice_Setting parameters that are used to define the behaviour of all active SCO connections.

 

PARAMETERS

9

8

7

6

5

4

3

2

1

0

Bit # of Voice Setting Parameters

0

0

0

0

0

0

0

0

0

0

Linear

0

0

0

0

0

0

0

0

0

1

µ-Law Baseband Coding

0

0

0

0

0

0

0

0

1

0

A-Law Baseband Coding

0

0

0

0

0

0

0

0

0

0

1’s Complement

0

0

0

0

0

0

0

1

0

0

2’s Complement

0

0

0

0

0

0

1

0

0

0

Sign-magnitude

0

0

0

0

0

0

0

0

0

0

8-bit Input for Linear PCM

0

0

0

0

0

1

0

0

0

0

16-bit Input for Linear PCM

0

0

x

x

x

0

0

0

0

0

Used for denoting the PCM Bit Offset

0

0

0

0

0

0

0

0

0

0

CVSD air-coding format

0

1

0

0

0

0

0

0

0

0

µ-Law air-coding format

1

0

0

0

0

0

0

0

0

0

A-Law air coding format

Capabilities

Table 4-42 summarises the broad capabilities that are expected from the LC and in the table you will notice features are marked with M (Mandatory), O (Optional), X (Excluded), C (Conditional) and N/A (Not Applicable); this will determine what is expected from the features at the LC.

Inquiry and Inquiry Scan

An inquiry procedure is used to learn of the other devices in radio range, where the BD_ADDR and clock offsets are obtained; it is DeviceA that will enter an inquiry substate to perform this procedure. A device that wishes to be discovered (DeviceB) will enter an inquiry scan substate, where the device will respond with an inquiry response. In this state, DeviceB is waiting to receive an Inquiry Access Code (IAC). From an application perspective, these modes of operation are discussed in more detail in the Generic Access Profile, Chapter 2. It is here that specific rules are determined with regard to device behaviour and duration of operation in such modes. When devices have been discovered, this information is passed over to the Service Discovery Application Profile, Chapter 3, which manages the specific attributes that make up that device. What is being established here, as a dependency, is that the Bluetooth protocol stack must encompass and support such behavioural procedures for this profile to be considered compliant.

Table 4-42. The summary of capabilities that are required for the LC to enable a compliant Cordless Telephony Profile.

PROCEDURES

DEVICEA

DEVICEB

Inquiry

M

X

Inquiry Scan

X

M

Paging

M

X

Page Scan

X

M

Inter-piconet

O

O

Packet Types

M

M

Voice Codecs

M

M

Paging and Paging Scan

The inquiry substate and inquiry scan substate procedures are the initial methods used to learn of other devices in radio range; to this extent, the device has discovered sufficient information to gain a connection with the remote device. This is achieved when DeviceA has the intent to create a connection with DeviceB; DeviceA is now placed into a paging substate, where it will periodically transmit the Device Access Code (DAC). The DAC is used to target the device directly and the clock offset is used to gain an idea of the clock cycle of DeviceB. These parameters were originally obtained during our inquiry procedures. If DeviceB wishes to be connected, then it will enter a page scan substate and will respond accordingly to DeviceA. An inquiry procedure may be avoided if the BD_ADDR is already known, although a connection may take a little longer if the clock offset is not known.

Inter-piconet

Inter-piconet capabilities describe the process that allows the master to manage multiple connections from slave devices. During a connection, other users may temporarily witness degradation in the service being provided; however, the master must be capable of accepting new piconet participants.

Table 4-43. The summary of packet types that are required for the LC to enable a compliant Cordless Telephony Profile.

PACKET TYPE

TL

GW

DM1

M

M

DH1

M

M

DM3

M

M

DH3

M

M

DM5

M

M

DH5

M

M

HV1

M

M

HV2

M

M

HV3

M

M

DV

X

X

Table 4-44. The summary of voice codec schemes available for voice-related profiles.

VOICE CODEC

TL

GW

CVSD

M

M

A-Law

M

M

µ-Law

M

M

Packet Types

There are numerous packets types available and Table 4-43 identifies those most frequently used for profile support. There are also a number of common packet types that are used for general purpose transport; for example, the ID packet is used for inquiry procedures and a POLL packet would be sent by DeviceA to determine if a slave is active on a channel.

The DM1 packet type is used to transmit control data over any connection, but may also be used to transport a genuine payload. HV1, HV2 and HV3 are various SCO packet types to carry audio-specific data, where a DV packet can combine ACL and SCO specific data; their support in this profile is reflected in Table 4-43. Various ACL packet types are also available. In fact, seven types including the DM1 type are attributed to carrying user-specific data. These include DH1, DM3, DH3, DM5, DH5 and AUX1. Similarly, Table 4-43 summarises their support in this profile.

Voice Codecs

Table 4-44 summarises voice codec support in this profile. Voice coding schemes are used to provide compression and to overcome potential errors in data transmission. Continuous Variable Slope Delta (CVSD) provides the second scheme, which is particularly efficient for voice communication; it also tolerates potential errors in the audio data. The Pulse Code Modulation (PCM) has two types of logarithmic compression; these are A-law and µ-law, where either compression technique can be applied on the voice channels over the air-interface.

Summary

  • The Cordless Telephony Profile provides usage scenarios that form the 3-in-1 phone concept.

  • The Cordless Telephony Profile and Intercom Profile are very similar in nature, where both profiles depend on the TCS.

  • The TCS is a specific component that manages and coordinates incoming and outgoing calls; it resides above L2CAP in the Bluetooth protocol stack architecture.

  • A cordless handset is used, which has been specifically Bluetooth-enabled; a mobile phone may also behave as a cordless handset.

  • A multimedia PC may also have functionality that enables it to provide cordless telephony-like capabilities though the use of external or internal speakers and a microphone.

  • Park Mode is recommended for any TL, since this will ultimately conserve battery life.

  • In multi-terminal support, the GW is capable of managing up to seven connections from different TLs.

  • When a GW is configured for multi-terminal support, it must remain master of the piconet.

  • The GW can support only three active SCO channels. This limitation is imposed due to the bandwidth reserving nature of SCO.

  • There are elements of crossover with the Intercom Profile. Intercom calls are supported between TLs.

  • A headset may be used to replace the cordless handset, but it must support the Cordless Telephony Profile.



[1] Specifically, the number of active connections permitted would be seven. This is due to the number of concurrent connections that can be maintained by one master device. The AM_ADDR represents the slave member address and is used to identify active participants; this is currently restricted to 3 bits, although slaves that become disconnected or parked give up this address.

[2] A Bluetooth dongle is a device that extends the capability of a PC or notebook; it bestows the wireless ability to connect to other Bluetooth-enabled devices. PCMCIA or USB adaptors are typical products that have emerged on the market and support many of the profiles covered within this book.

[3] Some larger PC and notebook manufacturers have begun to supply PCs and notebooks with Bluetooth wireless connectivity as an integrated part of the unit. As we see the popularity of Bluetooth technology increase, more and more manufacturers will choose to incorporate a Bluetooth solution into their products.

[4] The term local base-station in this context refers to a corded-handset on an individual’s desk. In some cases, the user will choose a corded headset to provide them with hands-free capability.

[5] This mode provides low-power usage and, as such, little activity of the slave, but it remains synchronised with the channel, see our later discussion in Section 4.5.1.6.4, Supporting Park Mode. It is recommended that park mode be supported for this profile so that TLs and possibly GWs may conserve battery consumption.

[6] The generic term packet is used to describe the nature of a structure that is used to encode data.

[7] A payload refers to encoded data that is transported between devices. It will contain information that the peer device will act upon.

[8] L2CAP payloads are passed directly onto LMP when implemented on a hostless system.

[9] A GW supporting multi-terminal connections must remain the master of the piconet.

[10] The TL may refuse the request to become the slave if it needs to remain the master.

[11] The Bluetooth protocol stack provides the flexibility of issuing a master-slave switch at any time during a Bluetooth connection establishment; Figure 4-19 provides one such example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.180.68