avetanaBluetooth JSR82 implementation for Windows (98-XPSP2, Mobile 2003), MacOS X and Linux
First steps with avetanaBluetooth
Intention of avetanaBluetooth
avetanaBluetooth in a JSR-82 implementation for Desktop PCs running Windows, Linux
or MacOS X. The Intention of avetanaBluetooth
is to enable Bluetooth Development on Desktop PCs using the standardized JSR-82 APIs.
For MacOS X you'll need Bluetooth Software 1.5. The software has been tested on OS 10.3
For Linux you will need a recent version of the BlueZ Stack.
For Windows, the Widcomm Stack that comes with most BT-Dongles is required. avetanaBluetooth
supports Widcomm Version 220.127.116.11 SP 5 or later. 3.0.1 is preferred.
Since avetanaBLuetooth version 1.2.0, the Microsoft Bluetooth Stack that ships with Windows XP SP2 is also supported. The Microsoft Stack does not support L2CAP
On Windows Mobile 2003 (PocketPC) you will need NSICom's CrEme 3.25 or CrEme 4.0 VM available through www.nsicom.com. You need to have Widcomm BTW-CE 18.104.22.168 or newer as your Bluetooth Stack on the device.
Some PocketPC devices need to additional DLLs for avetanaBluetooth to work. If you are having trouble getting avetanaBluetooth to work on your PDA, please download BtSdkCE30.dll and BtCoreIf.dll and place them in the \Windows directory.
AvetanaBluetooth also works with IBMs J9 VM on PocketPC.
On all systems, Java 1.1.8 or later supporting JNI is required.
Not all Bluetooth-Stacks support all the features that JSR-82 specifies.
Here is a list of unsupported Features of JSR-82 depending on the Operating Systems (M for MacOS X, W for Windows (Widcomm), L for Linux)
- Searching for services that are not in the public browse group (w)
- Encryption, Authentication (l)
- Encrypting existing connections (m, w)
On MacOS X (10.3) Device Inquirys cannot be done without Apple's
GUI-Components. Therefore avetanaBluetooth can only report on previousely found
devices when inquirying. if you want to find new devices, you have
to do an inquiry from a Cocoa Application first (e.g. /Applications/Utilities/Bluetooth Serial Port Utility).
With OS 10.4 device inquiry works as expected.
Widcomm does not allow access to the LocalDevice-Class. Therefore, the local device class
cannot be read on Windows when using the Widcomm stack.
L2CAP-Client Connections on Windows require Widcomm-Version 22.214.171.124 SP 5 or newer (1.4.3 .... 3.X).
RFComm-Connections (Client/Server) and L2CAP-Server channels already work with Software version 1.4.2.
L2CAP is not supported with the Microsoft stack.
Integration into custom software
To compile and run your Application simply include avetanaBluetooth.jar in your CLASSPATH. There is no need to do any Stack-Initialization anymore. Simply call Connector.open() or startInquiry() on your
LocalDevice Object to start using Bluetooth.
avetanaBluetooth.jar includes 2 sample applications. One is de.avetana.bluetooth.JSRTest which is suitable for all
J2SE (Swing application) environments.
To start the JSRTest application, simple double click the JAR-Archive or start it from the command-line using:
java -jar avetanaBluetooth.jar
For PocketPC there is de.avetana.bluetooth.test.PocketTest.
Both applications demonstrate almost all capabilities of the library and can be used for testing purposes.
The sourcecode of JSRTest.java is included in the JAR-Archive. It can be extracted from the archive with the following command:
jar xvf avetanaBluetooth.jar de/avetana/bluetooth/JSRTest.java
Other sources and demos are available through the sourceforge project page.