Bluetooth™

Connect Without Cables Second Edition

Jennifer Bray
Charles F. Sturman

Image
Prentice Hall PTR
Upper Saddle River, New Jersey 07458
www.phptr.com

Library of Congress Cataloging-in-Publication Data

Bray, Jennifer.

    Bluetooth 1.1: connect without cables/Jennifer Bray, Charles Sturman.—2nd ed.

        p.cm.
    Includes bibliographical references and index.
    ISBN 0-13-066106-6

      1. Bluetooth technology. 2. Telecommunication—Equipment and supplies. 3. Computer 
network protocols. I. Sturman, Charles F. II. Title.

TK5103.3 .B72 2002
004.6'2—dc21                                                              2001054573

Image

© 2002 by Prentice Hall PTR
Prentice-Hall, Inc.
Upper Saddle River, NJ 07458

This book is dedicated to my mother Beryl,
who taught me to aim high and would now be so proud.

Charles

Contents

Foreward to the Second Edition

Foreward to the First Edition

Preface to the Second Editon

Preface to the First Editon

Acknowledgments

Introduction

1 Overview

1.1 Bluetooth’s Origins

1.2 The Bluetooth SIG

1.3 Aims

1.4 The Protocol Stack

1.5 Security

1.6 Applications and Profiles

1.7 Using Bluetooth

1.8 Management

1.9 Test and Qualification

1.10 Bluetooth in Context

1.11 Summary

Protocol Stack Part 1—The Bluetooth Module

2 Antennas

2.1 Radiation Pattern

2.2 Gains and Losses

2.3 Types of Antennas

2.4 Ceramic Antennas

2.5 On-chip Antennas

2.6 Antenna Placement

2.7 Summary

3 Radio

3.1 Introduction

3.2 Frequency Hopping

3.3 Modulation

3.4 Symbol Timing

3.5 Power Emission and Control

3.6 Radio Performance Parameters

3.7 Simple RF Architecture

3.8 RF System Timing

3.9 Blue RF

3.10 Summary

4 Baseband

4.1 Introduction

4.2 Bluetooth Device Address

4.3 Masters, Slaves, and Piconets

4.4 System Timing

4.5 Physical Links: SCO and ACL

4.6 Bluetooth Packet Structure

4.7 Packet Types and Packet Construction

4.8 Logical Channels

4.9 Channel Coding and Bitstream Processing

4.10 Timebase Synchronisation and Receive Correlation

4.11 Frequency Hopping

4.12 Summary

5 The Link Controller

5.1 Introduction

5.2 Link Control Protocol

5.3 Link Controller States

5.4 Link Controller Operation

5.5 Piconet Operation

5.6 Scatternet Operation

5.7 Master / Slave Role Switching

5.8 Low-Power Operation

5.9 Baseband / Link Controller Architectural Overview

5.10 Summary

6 Audio

6.1 Introduction

6.2 Audio Transports in the Protocol Stack

6.3 Quality and Bandwidth

6.4 SCO Links

6.5 Audio CODECs

6.6 Audio Subsystem

6.7 Audio Data Formats and HCI

6.8 Implementation

6.9 Summary

7 The Link Manager

7.1 LMP Protocol Data Units (PDUs)

7.2 The Link Management Channel

7.3 Link Setup

7.4 LMP Link Shutdown

7.5 Role Change

7.6 Control of Multi-Slot Packets

7.7 Security

7.8 Low-Power Modes

7.9 Power Control

7.10 Quality of Service

7.11 Information Messages

7.12 Supported Features

7.13 LMP Version

7.14 Name Request

7.15 Test Mode

7.16 Summary

8 The Host Controller Interface

8.1 HCI Packet Types

8.2 The HCI Transport Layer

8.3 Flow Control

8.4 Configuring Modules

8.5 Inquiring: Discovering Other Bluetooth Devices

8.6 Inquiry Scan: Becoming Discoverable

8.7 Paging: Initiating Connections

8.8 Page Scan: Receiving Connections

8.9 Sending and Receiving Data

8.10 Switching Roles

8.11 Power Control

8.12 Summary

Protocol Stack Part 2—The Bluetooth Host

9 Logical Link Control and Adaptation Protocol

9.1 Multiplexing Using Channels

9.2 L2CAP Signalling

9.3 Establishing a Connection

9.4 Configuring a Connection

9.5 Transferring Data

9.6 Disconnecting and Timeouts

9.7 Connectionless Data Channels

9.8 Enabling and Disabling Incoming Connectionless Traffic

9.9 Handling Groups

9.10 Echo and Ping

9.11 Get Information

9.12 L2CAP State Machine

9.13 Implementation-Dependent Issues

9.14 Summary

10 RFCOMM

10.1 Serial Ports and UARTs

10.2 Types of RFCOMM Devices

10.3 RFCOMM Frame Types

10.4 Connecting and Disconnecting

10.5 Structure of RFCOMM Frames

10.6 Multiplexer Frames

10.7 Service Records

10.8 Summary

11 The Service Discovery Protocol

11.1 SDP Client/Server Model

11.2 The SDP Database

11.3 Browsing SDP Records

11.4 Universally Unique Identifiers (UUIDs)

11.5 SDP Messages

11.6 Service Discovery Profile

11.7 Summary

12 The Wireless Application Protocol

12.1 The WAP Forum

12.2 The WAP Stack

12.3 PPP Links

12.4 WAP Clients and Servers

12.5 Suspend and Resume

12.6 Service Discovery

12.7 WAP Interoperability

12.8 Using WAP

12.9 Summary

13 OBEX and IrDA

13.1 OBEX in the Bluetooth Stack

13.2 Object Model

13.3 Session Protocol

13.4 Summary

14 Telephony Control Protocol

14.1 TCS Signalling

14.2 Call Establishment Signalling

14.3 Call Clearing Signalling

14.4 DTMF Signalling

14.5 Wireless User Group (WUG) Signalling

14.6 Connectionless Signalling

14.7 TCS Call States

14.8 Summary

Protocol Stack Part 3—Cross Layer Functions

15 Encryption and Security

15.1 Key Generation and the Encryption Engine

15.2 Secret Keys and PINs

15.3 Pairing and Bonding

15.4 Starting Encryption

15.5 Security Modes

15.6 Security Architecture

15.7 Summary

16 Low-Power Operation

16.1 Controlling Low-Power Modes

16.2 Hold Mode

16.3 Sniff Mode

16.4 Park Mode

16.5 Low-Power Oscillator

16.6 Summary

17 Quality of Service

17.1 Requesting QOS

17.2 QOS Violations

17.3 Flushing and Delays

17.4 Link Supervision

17.5 Broadcast Channel Reliability

17.6 Data Rates and Packet Types

17.7 Summary

18 Managing Bluetooth Devices

18.1 Link Configuration and Management

18.2 Device Manager Architecture

18.3 Security Management

18.4 Integrating Applications

18.5 Accounting Management

18.6 Capacity

18.7 User Interface Design

18.8 Summary

Applications—The Bluetooth Profiles

19 Foundation Profiles

19.1 Structure of Profiles

19.2 The Generic Access Profile

19.3 The Serial Port Profile

19.4 Dial Up Networking

19.5 FAX Profile

19.6 Headset Profile

19.7 LAN Access Point Profile

19.8 Generic Object Exchange Profile

19.9 Object Push Profile

19.10 File Transfer Profile

19.11 Synchronisation Profile

19.12 Intercom Profile

19.13 The Cordless Telephony Profile

19.14 Benefits of Profiles

19.15 Summary

20 Draft Post – Foundation Profiles

20.1 The Human Interface Device Profile

20.2 The Hands-Free Profile

20.3 The Basic Imaging Profile

20.4 The Basic Printing Profile

20.5 The Hard Copy Cable Replacement Profile

20.6 Summary

21 Personal Area Networking

21.1 The PAN Profile

21.2 Bluetooth Network Encapsulation Profile

21.3 Summary

22 ESDP for UPnP

22.1 Universal Plug and Play Device Architecture

22.2 L2CAP Based Solutions

22.3 IP Based Solutions

22.4 Summary

Test and Qualification

23 Test Mode

23.1 Activating Test Mode

23.2 Controlling Test Mode

23.3 Radio Transmitter Test

23.4 Loopback Test

23.5 Summary

24 Qualification and Type Approval

24.1 Bluetooth Qualification

24.2 Bluetooth Interoperability Testing

24.3 Regulatory Type Approval

24.4 Summary

Bluetooth in Context

25 Implementation

25.1 Introduction

25.2 System Partitioning

25.3 Hardware Integration Options

25.4 Bluetooth as an IP Core

25.5 ASIC Prototyping and FPGAs

25.6 Making the Right Design Choices

25.7 Radio Implementation

25.8 Summary

26 Related Standards and Technologies

26.1 Introduction

26.2 What Are the Requirements?

26.3 Infrared Data Association (IrDA)

26.4 Digital Enhanced Cordless Telecommunications (DECT)

26.5 IEEE 802.11

26.6 The HomeRF™ Working Group (HRFWG)

26.7 IEEE 802.15 and the Wireless Personal Area Network (WPAN)

26.8 HIPERLAN

26.9 MMAC

26.10 The Future

26.11 Summary

26.12 Useful Web Addresses

27 The Bluetooth Market

27.1 Introduction

27.2 Market Pull and Technology Push

27.3 Market Segments

27.4 Success in the Marketplace

27.5 Enabling Technologies and Components

27.6 Consumer Products

27.7 The Bluetooth Brand

27.8 Summary

28 Future Developments

28.1 Working Groups and New Bluetooth Profiles

28.2 Profile Working Groups

28.3 Future Bluetooth Core Specifications

28.4 Summary

Appendix—Bluetooth 1.1 Updates

Glossary

References

Index

Foreward to the Second Edition

It is often said that a single radio transceiver is uninteresting; two transceivers that exchange useful information become interesting. BLUETOOTH™ wireless technology promises to make the world a very, very interesting place.

The vision of a world where you can Connect Without Cables that Jenny and Charles described in their original edition is now becoming a reality. Early products began to show up on store shelves soon after the publication of their book. Part of the process of creating a new technology is developing these early products to validate the thousands and thousands of work days put into making it a reality. Many things must be confirmed when a new technology is rolled out.

There was a confirmation that the very talented pool of BLUETOOTH wireless technology engineers got almost everything right with version 1.0. As could be expected, there were some things that seemed OK on paper that did not work optimally when translated into hardware and software. A few things were omitted; there were some instances of vagueness in the text of the original specification; and there were a few outright errors. These deficiencies manifested themselves in interoperability problems. Version 1.1 was published in early 2001 to address those issues.

As I implied above, Jenny and Charles’ original work predated the current version of the BLUETOOTH specifications. Although much of their previous writing was still vital and valid, it was important to update their work. Updating they have done—and more. There is an added section on the new application profiles that are being developed. These profiles are becoming available for companies to create new and exciting products. Many of these new developments are being introduced to the general public for the first time with this text.

In addition to the technology being refined, so has the organization behind it. Since the original publication of this book the Bluetooth Special Interest Group—often referred to as the SIG—has undergone significant changes. The SIG started out as a loose confederation of companies with the idea of creating a low-cost, easy-to-use method of eliminating wire between personal devices. It is now an independent corporation with many, many member companies.

Participation by this expanded membership in Working Groups, Study Groups, Expert Groups, and oversight committees is invaluable. I encourage the readers of this book to consider joining—and becoming active in—Bluetooth SIG, Inc. I look for the membership to make even more important contributions in the future.

Member companies help to define the expansion and evolution of Bluetooth wireless technology. The SIG has established a set of rules and procedures that ensure the products created today will continue to work with the products created in the future. The technology the authors describe here is the baseline for all future BLUETOOTH work.

In describing the baseline technology, Jenny and Charles move from overview to technical details in a seamless transition. Establishing context and moving to descriptions of a sophisticated protocol stack is not easy. Doing it in a clear, concise, and easy to use fashion is next to impossible. These two authors have done just that.

Tom Siep

General Manager

Bluetooth SIG, Inc.

Garland, Texas

November 2001

Foreward to the First Edition

Many people have envisioned wireless devices effortlessly communicating with one another. In this panacea, devices of all types begin to correspond just by coming within proximity of each other. Imagine one device fulfilling the needs of another, and ultimately serving the needs of mankind. Although Bluetooth wireless technology began as a simple, “get rid of the cables” concept, it has come to embody the hopes and dreams of many visionaries who feel that this may be the technology that will allow us to fulfill at least a portion of these dreams.

Bluetooth: Connect Without Cables is an important book. Indeed, there is a very good chance it will become required reading for anyone who is considering the use of Bluetooth wireless technology in their designs or is looking to gain a complete understanding of this technology.

As we have learned from the past, the simpler a device is for its user, the more complex it is to its designer. Since Bluetooth wireless technology is targeted at non-technical consumers, it must be “transparent to the user,” both practically and literally. This is a daunting task for a designer, but even more daunting was the task of the individuals that drafted the Bluetooth specification. Although they did a good job at defining the specifications, understanding these in their raw form can be confusing and time consuming.

It’s at this point that Bluetooth: Connect Without Cables takes over. This book provides a clear and concise interpretation of the Bluetooth specifications, which are provided in a step by step tutorial format. In addition to quickly gaining an understanding of the technology and its capabilities, the authors provide additional insights, which will assist in resolving issues that are hinted at in the specification, but certainly not discussed. In fact, the authors have endeavored to touch on every aspect of Bluetooth, from the specification and its shortcomings to enhancements that may be required, implementation concepts and issues, health concerns, competing and associated technologies, the match between technology push and market pull, and a discussion on accounting management issues.

Bluetooth: Connect Without Cables provides a complete tutorial of the technology, beginning with the antenna, through the protocol stack and its interfaces, to the applications and user interfaces that drive them. At each level, you will be presented with an easy to understand discussion in which the authors provide invaluable insight. Discussions include: timing requirements, differences between specification recommendations and actual implementations, as well as workarounds to their shortcomings, and suggested methods for selecting various options provided in the specification.

The authors have not only provided suggestions for improvements to the specification, such as increasing the length of the preamble, but have also openly shared their expertise. As an example, the authors have devoted an entire chapter to the utilization of a Device and Security Manager module. This level of insight is normally held in reserve and can only be obtained after spending enormous amounts of money in research or through the utilization of customized consulting firms.

To aid in the usability of this book, the authors have included extensive graphics and numerous examples. In addition, they have broken each main segment of the technology into its own chapter. An extremely comprehensive glossary is found in the back of the book.

By the time you complete your reading, you will have a full understanding of Blue-tooth wireless technology, including how HCI commands are used, what people are doing about things that have been removed from earlier versions of the specification, when to use different modes, and the issues you may run into when implementing this robust technology.

Joe Mendolia

Computer Access Technology Corporation

Preface to the Second Edition

A year later, and another version of the Bluetooth specification released, the Bluetooth World has moved on far enough to justify a second edition of this book. Whilst updating for version 1.1 we’ve also taken the opportunity to correct a few errors that crept into the first edition, thanks to Don Felton, Bill Saltzstein, Klaus Mehle, Steve Singer, Simon Morris, and everyone else who provided us with errata.

Each section of the book has been updated with information on version 1.1 of the Bluetooth specification. Many of the changes have just been clarifications, but here and there functionality has been altered and improved. Where 1.0b and 1.1 are different we have identified the changes, and where relevant included notes on backwards compatibility.

For those of you who want a summary of the changes there is an appendix with details on the critical errata which led to version 1.1. This appendix tells you in one place what is different, and why it was altered.

Of course as the specification progresses, so does the rest of the community of Bluetooth users. In the past year many new products and components have qualified, and the qualification program itself has matured. Real products have come on the market, and we’re starting to see Bluetooth technology in use for real. To reflect those developments you’ll find the section on Bluetooth in Context has changed.

We’ve reached version 1.1, but still more progress is being made in many Bluetooth SIG working groups to bring out a new generation of profiles, and to enhance the core Bluetooth specification. As we were updating the book for version 1.1 some draft profiles were put on public release. These profiles open up new applications for Bluetooth devices, so to cover them we’ve added a whole new section to the book called “Applications—The Bluetooth Profiles”. The draft profiles may change slightly before being formally adopted, and more new profiles are due for public release soon. Watch the book’s companion web site http://www.phptr.com/bluetooth/bray/index.html for more details: we’ll publish these after information is made available in public.

Preface to the First Edition

This book came about from a conversation in the Hotel Mercure bar in Brussels, Belgium. We had just finished the first day of client training in our Bluetooth solution, and hadn’t said a single word about our implementation yet! Why? Well, Bluetooth was so new that nobody knew much about it, there were no textbooks, no courses, nothing but a thick specification document and a few white papers. So before we could begin to explain the fine details of what we’d done, we had to spend a day explaining the Bluetooth specification. After the first beer, we thought somebody ought to write a book about Bluetooth; after the second beer, we thought we should do it; after the last beer, we had a contents page.

Why the title? Well, “Connect Without Cables” is basically what Bluetooth started out doing. It’s a short range wireless communication system, and the word “wireless” pretty much says it all. The first applications people came up with were all about throwing away the clutter of cables that plagues modern portable devices—Bluetooth took away the cable dangling from a headset, removed the clutter of wires at the back of a PC, and let a phone talk to a PDA without needing a cable that took up more pocket space than either device. Now there are more imaginative uses than straight cable replacement, from small wireless office networks to the much hyped Personal Area Network, or PAN. But the basic functionality that Bluetooth provides is still the same: connection without cables.

During the last year or so, we have seen a Bluetooth system design evolve from abstract idea to evaluation board. Along the way, we struggled to understand the Bluetooth specification. Some parts of it don’t make sense until you’ve read later parts, some parts don’t make sense until you’ve tried them out, and some of the parts we started with will never make sense and have since been corrected. The specification is in a much better state than the preliminary versions we started with, but like all such things, it’s still not an easy read. So this book aims to provide people working with Bluetooth an easier introduction than the one we had.

A new version of the Bluetooth specification (version 1.1) is due to be published during the 4th quarter of 2000. In order to keep this text consistent, we only consider the existing version 1.0B specification except for one or two proposed corrections for v1.1, which are especially worth mentioning here. Although these are mostly minor improvements and clarifications to the existing 1.0B specification, it is important for the reader to keep abreast of any revisions particularly since there may well be other refinements before the major evolution which Bluetooth 2.0 will represent. To facilitate this, there is a companion Website to accompany Bluetooth: Connect Without Cables where we will place any errata and useful updates to the text as Bluetooth evolves.

Acknowledgments

Writing a book such as this while holding down a “day job” is not a trivial exercise, and there are a number of people whose help and assistance have made it possible. First and foremost, we would like to thank Heather and Don for all their support and understanding; putting up with late nights, lost weekends, and sheets of paper strewn around the house!

We would also like to thank:

TTP Communications for allowing us to write the book, and everyone in the “Toothbrush” team for their hard work without which this book would not have been possible.

Bernard, Lisa, and the staff at Prentice Hall for bearing with us in our first foray into the publishing world, and Patty at Pine Tree Composition for be so helpful with revisions.

Larry Taylor, for originally explaining what a WLAN is!

Mike Witherspoon of Personal Development Alliance for sowing the seeds of the can-do attitude in the first place.

Tina and Steve for the cooked breakfasts one very long bank holiday weekend.

Thanks are also due to:

gigaAnt (www.gigaAnt.com), Alcatel Microelectonics (www.alcatel.com), 3Com (www.3com.com), TTP Communications (www.ttpcom.com), and Ericsson (www. ericsson.com) for providing photographic material and technical information. Antenova (www.antenova.com) for providing a photograph of their ceramic antenna; Hewlett-Packard (www.hp.com) for providing a photograph of their Deskjet 995 printer; Logitech for providing a photograph of their cordless mouse; Parrot (www.say-parrot.com) for providing a photograph of their CK3000 handsfree car kit; and CSR (www.csr.com) for providing a photograph of their BlueCore chip.

Introduction

Bluetooth is set to be the fastest growing technology since the Internet or the cellular phone, with forecasts of 200M devices shipped in 2001 and a total component market of $1 billion in the same year. Incredible, especially considering that the specification providing this worldwide industry standard only saw its first public outing in mid 1998. Although Bluetooth represents a very simple proposition, obviating the need for connectivity via physical wires, this is itself the powerful added value of Bluetooth. Connectivity becomes simple, seamless, and intuitive. However, like many things, in order to deliver an apparently simple and transparent function to the user requires complexity and much work behind the scenes.

The Bluetooth system is both complex and full-featured, with many components and layers of abstraction. As hinted at already, many people are likely to come into contact with Bluetooth from various angles: technology development, from commercial exploitation, or as users, and this book is intended to provide something for each of these different groups. The text is written to allow the reader to obtain the level of information required. As such, it should appeal to everyone, from application developers looking to understand what their applications must interface to, to systems designers wishing to evaluate how and what Bluetooth can add to their products, to managers and marketers wishing to obtain an overview of the Bluetooth space.

We start out with an overview of Bluetooth, which summarises many of the areas covered later on in detail. The overview can be read as an introduction to the topics which follow, or as a standalone introduction to Bluetooth for the reader who requires much less detail. The book then goes on to explain the technical operation of the Bluetooth system in detail, where it is intended to be a much easier read and a more accessible text than any formal specification could ever be.

We work our way up the protocol stack from antennas and radios to host applications, and also look at the wider implications of how one might set about using or designing in Bluetooth technology. The book also looks at the higher level issues of applications and host system considerations before moving on to discuss the potential market for Blue-tooth technology and Bluetooth enabled products as well as other related or even competing technologies which are in existence. We then look to the future and what one might expect to see happening in the fast moving arena of wireless technology over the next few years.

To make the text easier to use as a reference and to allow readers to access the information they require, the book is split into five distinct sections as follows:

  • Protocol Stack Part 1—The Bluetooth Module
    These chapters describe the lower parts of the system from the radio up to the host interface.
  • Protocol Stack Part 2—The Bluetooth Host
    Higher parts of the system which would typically exist on or in a host system that is “Bluetooth Enabled” are described in these chapters.
  • Protocol Stack Part 3—Cross Layer Functions
    This part covers aspects and functions of Bluetooth that cross over the boundaries between different layers in the stack.
  • Test and Qualification
    Production testing and conformance or type approval are explained in this section.
  • Bluetooth in Context
    This section addresses product implementation and commercial issues, including an analysis of the Bluetooth market potential and time frame.

Jargon and acronyms can often be barriers to understanding material which would otherwise be straightforward, and so we have explained terms as we use them in the text. To allow the text to be used as a reference, however, we have also provided a full glossary of acronyms and terms. We hope this will prove useful, not just when reading this book, but also when reading other material on Bluetooth.

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

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