This book provides an introduction to Bluetooth wireless technology and Bluetooth programming, with a specific focus on the parts of Bluetooth that concern a software developer. While there is already a host of existing literature about Bluetooth, few of these texts are written for the programmer who is concerned only with creating Bluetooth software applications. Instead, they tell all about Bluetooth, when most of the time, the programmer is interested only in a tiny fraction of this information.
This book purposefully and happily leaves out a great deal of information about Bluetooth. Concepts are simplified and described in ways that make sense to a programmer, not necessarily the ways they're laid out in the Bluetooth specification. The approach is to start simple, allowing the reader to quickly master the basic concepts with the default parameters before addressing only a few advanced features.
Despite these omissions, this book is a rigorous introduction to Bluetooth, albeit with a narrow focus. Applications can be developed without an understanding of the radio modulation techniques or the algorithms underlying the generation of Bluetooth encryption keys. Programmers, however, do need to understand issues such as the available transport protocols, the processes governing establishing connections, and the mechanisms for transferring data.
We strongly believe in learning by example, and have included working programs that demonstrate the concepts and techniques introduced in the text. Examples are provided for a wide variety of programming languages and environments, including Python, C, and Java, running on GNU/Linux, Windows, Nokia Series 60, and OS X. Special emphasis is given to the Python language examples -- the simplicity and clarity of Python allows us to very easily show the translation of concepts and techniques into actual working programs. We believe that programmers who have never seen or used Python before will find these examples easy to follow and understand.
This book is not meant to be a be-all-end-all guide to Bluetooth programming, rather it is meant to serve as a stepping stone, the first foothold for programmers interested in working with Bluetooth. The exposition of concepts and demonstration of techniques should be sufficient to allow any programmer to start creating his or her own functional Bluetooth applications that can interoperate with many other Bluetooth devices. For those interested in a deeper understanding of the inner workings and nitty-gritty details of Bluetooth, this book servers as sufficient preparation to enable one to tackle the more complex and technical documents like the Bluetooth specification itself.
This book targets the computer programmer looking for an introduction to Bluetooth and how to program with it. It assumes no previous knowledge of Bluetooth (you may have never even heard of it before picking up this book), but does assume that you have some programming experience and have access to and can use either a GNU/Linux, Windows XP, or OS X development environment.
Because Bluetooth programming shares much in common with network programming, there will be frequent references and comparisons to concepts in network programmingm, such as sockets and the TCP/IP transport protocols. Having a basic understanding of these concepts will help solidify your understanding of Bluetooth programming, but the text is written such that it does not assume the reader has this knowledge.