This document describes how Bluetooth works and summarizes the Bluetooth specification in order to provide a foundation for understanding Apple’s Bluetooth support. It also provides task information, accompanied by several code examples, that illustrates how to develop applications that access Bluetooth-enabled devices.
What Is Bluetooth?
Who Should Read This Document?
Organization of This Document
See Also
Bluetooth is an open specification that enables low-bandwidth, short-range wireless connections between computers and peripherals, such as mice, cell phones, and personal data assistants (PDAs). The appeal of the Bluetooth model lies in its convenience for wirelessly transferring information and small data files between devices.
Bluetooth is not a networking solution, so it is not a competitor of AirPort, Apple’s wireless networking technology. Nor is it a replacement for the cables needed by high-bandwidth peripherals, such as FireWire. Rather, Bluetooth offers a replacement for IrDA (Infrared Data Association) technology, because it is not constrained by IrDA’s shorter range and line-of-sight requirements.
Because this document comprises conceptual and task information, its audience is broad. This document sets the stage with an overview of Bluetooth technology. Then, it describes how Apple implements the Bluetooth specification and how to access Bluetooth-enabled devices on Mac OS X. If you’re unfamiliar with Bluetooth technology in general, you can read this document for a high-level summary. If you’re primarily interested in learning about how Apple implements the Bluetooth specification, you’ll find a thorough description in this document. Finally, if you’re developing applications that communicate with or control Bluetooth-enabled devices, you should read this document to discover your options.
Apple provides application-level access to its Bluetooth API in both C and Objective-C, so knowledge of one or the other is important for understanding the code samples. Additionally, the Mac OS X Bluetooth model is at heart an object-oriented one, so familiarity with object-oriented principles is helpful.
This book is divided into three chapters:
“Bluetooth Technology Basics” describes how Bluetooth works and outlines the Bluetooth protocol stack as defined by the Bluetooth Special Interest Group. If you’re already familiar with Bluetooth technology and the architecture of the protocol stack, you may choose to skip ahead to the next chapter.
“Bluetooth on Mac OS X” describes the Mac OS X Bluetooth implementation and outlines the services available to you. This chapter provides a foundation for the specific code samples in the last chapter.
“Developing Bluetooth Applications” describes several common tasks that most Bluetooth applications perform. In addition, it presents a sample application that illustrates how to bring many of these tasks together in a working application. This chapter does not attempt to define the Mac OS X Bluetooth API. For complete API reference, see Reference > Hardware & Drivers > Bluetooth.
Apple provides comprehensive API reference documentation for its Bluetooth support. For documentation on APIs that support user-space access to Bluetooth devices, see Bluetooth Framework Reference. For documentation on APIs that support a consistent user interface to Bluetooth services, see Bluetooth User Interface Framework Reference.
In addition, Apple provides several sample applications that show how to make various Bluetooth connections. These samples are included in the Bluetooth SDK, available on the web at http://developer.apple.com/hardwaredrivers/bluetooth/.
When you install the Developer package, you get developer documentation as well as tools and example code. The Bluetooth API reference documentation is available in the Hardware & Drivers section of /Developer/ADC Reference Library/documentation/index.html. The sample code is in /Developer/Examples/Bluetooth. Bluetooth-specific utility applications are in /Developer/Applications/Utilities/Bluetooth.
There are many books that describe Bluetooth technology and the Bluetooth specification. A popular one is Bluetooth: Connect Without Cables by Jennifer Bray and Charles F. Sturman.
To view the Bluetooth specification itself, see http://www.bluetooth.com. This site also provides information about the Bluetooth Special Interest Group and the product-qualification program.
Last updated: 2007-12-11