FORUM NOKIA
PC Connectivity over Bluetooth in Java
TM
Applications
Version 1.0; December 8, 2006
J
ava
Forum.Nokia.com
Contents
1 Introduction................................................................................................................................................ 6
2 Use cases ...................................................................................................................................................... 7
2.1 Static connections...........................................................................................................................................7
2.2 Dynamic connections.....................................................................................................................................7
3 COM-based solution................................................................................................................................... 9
3.1 Architecture ......................................................................................................................................................9
3.1.1 Needed equipment and software.......................................................................................... 10
3.1.2 Pros and cons................................................................................................................................10
3.2 Determining which Bluetooth stack is in use.....................................................................................11
3.3 Installing the javax.com package...........................................................................................................12
3.4 Configuring the virtual COM port with the Windows XP Bluetooth stack................................. 12
3.4.1 Configuring the system to server mode .............................................................................. 12
3.4.2 Configuring the system to client mode ...............................................................................14
3.5 Configuring the virtual COM port with the Widcomm Bluetooth stack ..................................... 19
3.6 Finding the device’s services....................................................................................................................20
3.7 Examples.........................................................................................................................................................20
3.7.1 PC-to-phone example ................................................................................................................20
3.7.2 Phone-to-PC example.................................................................................................................21
4 JSR-82–based solution............................................................................................................................23
4.1 Architecture ...................................................................................................................................................23
4.1.1 Needed equipment and software.......................................................................................... 23
4.1.2 Pros ..................................................................................................................................................24
4.2 Example case: BlueCove .............................................................................................................................24
4.2.1 Installing BlueCove .....................................................................................................................24
4.2.2 Examples and issues...................................................................................................................24
5 Deciding factors .......................................................................................................................................28
5.1 Supported Bluetooth stack .......................................................................................................................28
5.1.1 Windows XP Service Pack 2 Bluetooth stack...................................................................... 28
5.1.2 Widcomm Bluetooth stack....................................................................................................... 29
5.2 Expenses..........................................................................................................................................................30
5.3 API documentation availability...............................................................................................................30
5.4 Features needed...........................................................................................................................................30
5.5 Utility modules..............................................................................................................................................31
6 Interoperability........................................................................................................................................32
6.1 Hardware level..............................................................................................................................................32
6.2 Protocol level.................................................................................................................................................32
PC Connectivity over Bluetooth in Java™ Applications 2
Forum.Nokia.com
6.3 Bluetooth stack implementation/API....................................................................................................34
6.4 Libraries and other software implemented over the Bluetooth stack ...................................... 34
7 References .................................................................................................................................................35
8 Evaluate this resource ............................................................................................................................36
PC Connectivity over Bluetooth in Java™ Applications 3
Forum.Nokia.com
Change history
December 8, 2006 v1.0 Initial document release
PC Connectivity over Bluetooth in Java™ Applications 4
Forum.Nokia.com
Copyright © 2006 Nokia Corporation. All rights reserved.
Nokia and Forum Nokia are registered trademarks of Nokia Corporation. Java and all Java-based marks are
trademarks or registered trademarks of Sun Microsystems, Inc. Other product and company names mentioned
herein may be trademarks or trade names of their respective owners.
Disclaimer
The information in this document is provided “as is,” with no warranties whatsoever, including any warranty of
merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal,
specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed
substantially prior to final release. This document is provided for informational purposes only.
Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to
implementation of information presented in this document. Nokia Corporation does not warrant or represent
that such use will not infringe such rights.
Nokia Corporation retains the right to make changes to this specification at any time, without notice.
License
A license is hereby granted to download and print a copy of this specification for personal use only. No other
license to any other intellectual property rights is granted herein.
PC Connectivity over Bluetooth in Java™ Applications 5