Chapter 2. Bluetooth Programming Introduced

This chapter presents an overview of Bluetooth, with a special emphasis on the parts that concern a software developer. Bluetooth programming is explained in the context of TCP/IP and Internet programming, as the vast majority of network programmers are already familiar and comfortable with this framework. It is our belief that the concepts and terminology introduced by Bluetooth are easier to understand when presented side by side with the Internet programming concepts most similar to Bluetooth.

2.1. Overview

Hovering at over 1,000 pages [1], the Bluetooth specification is quite large and daunting to the novice developer. But upon closer inspection, it turns out that although the specification is immense, the typical application programmer is only concerned with a small fraction of it. A significant part of the specification is dedicated to lower level tasks such as specifying the different radio frequencies to transmit on, the timing and signalling protocols, and the intricacies needed to establish communication. Interspersed with all of this are the portions that are relevant to the application developer. Although Bluetooth has its own terminology and ways of describing its various concepts, we find that explaining Bluetooth programming in the context of Internet programming is easy to understand since almost all network programmers are already familiar with those techniques. We do not try to explain in great detail the actual Bluetooth specification, except where it aids in understanding how it fits in with Internet programming.

Although Bluetooth was designed from the ground up, independently of the Ethernet and TCP/IP protocols, it is quite reasonable to think of Bluetooth programming in the same way as Internet programming. Fundamentally, they have the same principles of one device communicating and exchanging data with another device.

The different parts of network programming can be separated into several components

Some of these components do not apply to all models of network programming. In a connectionless model, for example, there is no notion of establishing a connection. Some parts can be trivial in certain scenarios and quite complex in another. If the numerical IP address of a server is hard-coded into a client program, for example, then choosing a device is no choice at all. In other cases, the program may need to consult numerous lookup tables and perform several queries before it knows its final communication endpoint.

Notes

[1]

http://www.bluetooth.org/spec