Bluetooth Application Programming with the Java APIs
eBook - ePub

Bluetooth Application Programming with the Java APIs

  1. 498 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Bluetooth Application Programming with the Java APIs

About this book

Adoption of Bluetooth wireless technology has made great strides in the last few years. One of the biggest steps forward—the standardization of Java APIs for Bluetooth wireless technology (JABWT)—is explained in detail in this book. The JABWT standard, defined by the JSR-82 specification, supports rapid development of Bluetooth applications that are portable, secure, and highly-usable. Wireless device manufacturers have responded to the JABWT specification by announcing mobile phones and other products that will run JABWT applications. Bluetooth Application Programming with the Java APIs explains in detail how to write Bluetooth applications using the Java APIs to exploit the power of both technologies. Written by the specification lead for JSR-82 and two other key participants in the definition of JABWT, this book provides the authoritative explanations and concrete examples you need to get started right away. About the AuthorsC Bala Kumar is a Distinguished Member of the Technical Staff at Motorola. He chaired the industry expert group that defined the Java APIs for Bluetooth wireless technology. He currently leads the systems software team for wireless platforms in Motorola's Semiconductor Products Sector. Paul J. Kline is a Distinguished Member of the Technical Staff at Motorola and the maintenance lead for the JABWT specification. He currently works on the System Software Architecture team in Motorola's Semiconductor Products Sector. Timothy J. Thompson is a Senior Software Engineer on the System Software Architecture team in Motorola's Semiconductor Products Sector. He was the OBEX architect on the JABWT specification team at Motorola. - Written by experts—the authors led the industry team that defined the JABWT standard and the Motorola team that developed the first JABWT implementation - Covers JABWT in depth and goes beyond the specification to explain how to use the standard effectively - A helpful resource both to Java programmers interested in Bluetooth wireless technology and to business managers interested in its potential for creating new business opportunities - Digs deeply into the programming areas you must master to successfully design and build JABWT applications, including RFCOMM, OBEX, device discovery, service discovery, and L2CAP - Details the real-world issues involved in programming Bluetooth devices and implementing the JABWT specification - Organized into sections that explicitly address the different needs of programmers, business managers, and project managers

Trusted byĀ 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Year
2003
Print ISBN
9781558609341
eBook ISBN
9780080490533
Chapter 1

Introduction

This chapter begins with an introduction to wireless connectivity and BluetoothĀ® wireless technology. It then gives:
• An overview of the Bluetooth protocol stack
• An overview of the Javaā„¢ 2 Platform, Micro Edition
• A description of the need for Java technology in Bluetooth devices

1.1 Wireless Connectivity

The rapid emergence of the Internet has changed the landscape of modern computing. We are in the information age. The term ā€œinformation ageā€ came about because of the exchange of massive amounts of data between computing devices using wired and wireless forms of communication. We are rapidly moving toward a world in which communications and computing are ubiquitous.
The convergence of computing and communications began in the early 1960s with the development of modems and the private branch exchange (PBX). The modem allowed computers to communicate with each other over telephone lines, and the PBX allowed computers to control the telephone exchange. The result was computer networks. Today, high-speed networks connect servers, personal computers, and other personal computing devices. High-end routers manage the networks. The distinction between voice and data networks has blurred, and the same network tends to carry both types of traffic. The desire and need to communicate with distant computers led to the creation of the Internet. The days of consumers’ buying a personal computer for standalone applications have disappeared. These days the primary motive for buying a personal computer is to use it as a communication tool, so that one can have Internet access to e-mail and the World Wide Web.
Increased dependence on the Internet and the need to stay connected from anywhere at all times have led to advances in mobile computing and communications. We have been communicating without wires for some time with satellites, cordless phones, cellular phones, and remote-control devices. However, in recent years the wireless communications industry has seen explosive growth. Long-range wireless communication invariably uses radio frequency (RF). Typically longrange communications use the licensed parts of the RF spectrum, and user fees apply. Short-range communications can use either RF or infrared and typically use unlicensed (i.e., free) parts of the frequency spectrum.
There are many short-range wireless standards, but the three main ones are Infrared from the Infrared Data AssociationĀ® (IrDAĀ®), Bluetooth wireless technology, and wireless local area network (WLAN). WLAN is also known as IEEE 802.11, and it comes in three main variants, 802.11b and 802.11 g, which operate at 2.4 gigahertz (GHz), and 802.11a, which operates at 5 GHz. The IrDA created a wireless communications system that makes use of infrared light. Whereas RF communication can penetrate many objects, IrDA is limited to line of sight. Both 802.11b and Bluetooth wireless technologies communicate in the 2.4-GHz RF band but are aimed at different market segments. The 802.11b technology has a longer range but consumes substantially more power than Bluetooth wireless technology. The 802.11 variant is primarily for data. The only protocol for supporting voice is Voice over Internet Protocol (VoIP). Table 1.1 provides a comparison of these three technologies.
Table 1.1
Comparison of Wireless Communication Technologies
Feature and FunctionIrDAWireless LANBluetooth Communication
Connection typeInfrared, narrow beam, line of sightSpread spectrum, sphericalSpread spectrum, spherical
SpectrumOptical 850–900 nmRF 2.4 GHz (5 GHz for 802.11a)RF 2.4 GHz
Transmission power40-500 mW/Sr100 mW10–100 mW
Maximum data rate9600 bps–16 Mbps (very rare)11 Mbps (54 Mbps for 802.11a, 802.11 g)1 Mbps
Range1 m100 m10–100 m
Supported devices2Connects through an access point8 (active), 200 (passive)
Voice channelsNo supportVolP3
Addressing32-bit physical ID48-bit MAC48-bit MAC
Wireless communications allow computing and communication devices to be used almost anywhere and to be used in new, progressive ways. The increase in wireless mobile Internet devices is proof that wireless connectivity is pervasive. Powerful software programming environments will help fuel this mobile computing explosion by enabling the development of compelling applications. The Java platform provides a powerful programming environment that has great promise for wireless devices. Many mobile devices now come with support for Java 2, Micro Edition (J2MEā„¢) programs. This book explains how to program Bluetooth applications with the Java programming language.

1.2 What Is Bluetooth Wireless Technology?

Bluetooth wireless technology is an open specification for a low-cost, low-power, short-range radio technology for ad hoc wireless communication of voice and data anywhere in the world. Let’s examine each of these attributes:
• An open specification means that the specification is publicly available and royalty free.
• Short-range radio technology means devices can communicate over the air using radio waves at a distance of 10 meters (m). With higher transmission power the range increases to approximately 100 m.
• Because communication is within a short range, the radios are low power and are suited for portable, battery-operated devices.
• Bluetooth wireless technology supports both voice and data, allowing devices to communicate either type of content.
• Bluetooth wireless technology works anywhere in the world because it operates at 2.4 GHz in the globally available, license-free, industrial, scientific, and medical (ISM) band.
The ISM frequency band is available for general use by ISM applications, hence several other devices (e.g., WLAN, cordless phones, microwave ovens) operate in this band. Bluetooth wireless technology is designed to be very robust in the face of interference from other devices.

1.2.1 History of Bluetooth Wireless Technology

The origins of Bluetooth communications started in 1994, when Ericsson began a study to find alternatives to connecting mobile phones to its accessories. The engineers looked at a low-power and low-cost radio interface to eliminate cables between the devices. But the engineers also realized that for the technology to be successful it has to be an open standard and not a proprietary one. In early 1998, Ericsson joined Intel, International Business Machines (IBM), Nokia, and Toshiba and formed the Bluetooth Special Interest Group (SIG) to focus on developing an open specification for Bluetooth wireless technology. The original companies, known as promoter companies, publicly announced the global Bluetooth SIG in May 1998 and invited other companies to join the Bluetooth SIG as Bluetooth adopters in return for a commitment to support the Bluetooth specification. In July 1999, the Bluetooth SIG published version 1.0 of the Bluetooth specification. In December 1999, four new promoter companies—3Com, Agere, Microsoft, and Motorola—joined the Bluetooth SIG.
Since then, the awareness of Bluetooth wireless technology has increased, and many other companies have joined the Bluetooth SIG as adopters, which gives them a royalty-free license to produce Bluetooth-enabled products. Adopter companies also have early access to specifications and the ability to comment on them. Interest in the Bluetooth SIG has grown, and there are currently more than 2000 member companies. These companies represent academia and a variety of industries.
Why is this technology called Bluetooth wireless technology? It was named after a Danish Viking king, Harald BlĆ„tand, who ruled circa A.D. 940–981. BlĆ„tand loosely translates to ā€œblue tooth.ā€ During his reign, King Harald BlĆ„tand is supposed to have united and controlled Denmark and Norway. Because this new radio technology was expected to unify the telecommunication and computing industries, it seemed fitting to name it after King Harald. A part-time historian on the team proposed Bluetooth as the internal code name. Because the Bluetooth SIG marketing team could not come up with a better n...

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright page
  5. Dedication
  6. List of Tables
  7. List of Figures
  8. Preface
  9. Acknowledgments
  10. About the Authors
  11. Chapter 1: Introduction
  12. Chapter 2: An Overview of JABWT
  13. Chapter 3: High-Level Architecture
  14. Chapter 4: RFCOMM
  15. Chapter 5: Obex
  16. Chapter 6: Device Discovery
  17. Chapter 7: Service Discovery
  18. Chapter 8: L2CAP
  19. Chapter 9: Example Applications
  20. Chapter 10: Implementing JABWT on a Device
  21. Chapter 11: Closing Remarks
  22. Appendix A: Complete Code Examples
  23. Appenix B: javax.bluetooth API
  24. Appendix C: javax.obex API
  25. References
  26. Index

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Bluetooth Application Programming with the Java APIs by C Bala Kumar,Paul J. Kline,Timothy J. Thompson in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Networking. We have over 1.5 million books available in our catalogue for you to explore.