BlueCove Linux D-Bus module

BlueCove-bluez is additional module for BlueCove to support JSR-82 on Linux using D-Bus interfaces.

Compiled for i386 and x86-64 of the native BlueCove code (shared library) is included in jar distribution. Native shared library have been tested and should work on Ubuntu, OpenSUSE and Fedora. For other Linux distributions you may need to compile it yourself.

This module works with BlueZ version 3 and BlueZ version 4 using D-Bus interfaces.

This module require additional library Java D-Bus and its dependencies.

This module require Java 5 Standard Edition or later

JNI library for this modile is not linked with libbluetooth.so

N.B. Another BlueZ interfacing module bluecove-gpl available.

Help us make it better.

The diagram below shows the architecture used by this module

JSR-82 and Bluetooth stack diagram on BlueZ

Usage

java -cp bluecove-2.1.1-SNAPSHOT.jar:bluecove-bluez-2.1.1-SNAPSHOT.jar:dbus.jar:unixsockets.jar:debug-disable.jar:hexdump.jar:yourApp.jar org.your.app.Main

Requirements

  • BlueCove library of the same mojor version
  • bluez-utils BlueZ version 3.x (3.10 or later) or BlueZ version 4.x installed on your system
  • Java 5 Standard Edition or later (OpenJDK, Sun Java SE or Apache Harmony)
  • On 64-bit Linux platform 64-bit java should be used
  • dbus-java and libmatthew-java packages. (dbus-java version 2.5.1 or later)

Limitations

  • Require additional library Java D-Bus and its dependencies. Only version 2.5 available as RPM on most Linux distributions and it has bug that breaks BlueCove device discovery!

JSR-82 Limitations

  • `ServiceRecord.setDeviceServiceClasses(..)` not supported.
  • `LocalDevice.getDeviceClass()` properly supported since BlueZ 4.34, on early versions will return 'computer' (There are no Class property in new org.bluez.Adapter).
  • `RemoteDevice.authenticate()` not supported on BlueZ v4

BlueCove API Limitations

  • In BlueZ 3.x Service registration with multiple adapters installed would be visible on all Adapters (This is because BlueZ interface org.bluez.Database is not bound to adapter)

Configuration options

System properties:

  • `bluecove.deviceID=1` bluecove supports multiple local devices, this will force it to select second one.
  • `bluecove.deviceID=hci1` this will force BlueCove to select second adapter.
  • `bluecove.deviceAddress=btaddr` select local devices by Bluetooth address

Documentation

API-Documentation for BlueCove Java docs. For application it is not recommended to use any classes or API other than defined in JSR-82.

API that enables the use of Multiple Adapters and Bluetooth Stacks in parallel in the same JVM is BlueCove specific, documentation can be found here.

JSR-82 extension bluecovepsm enables the use of specific PSM channel in L2CAP service. btl2cap://localhost;name=...;bluecovepsm=1007

BlueCove Installation and configuration instructions here.

BlueZ D-Bus API available in package `org.bluez.v3` and `org.bluez.v3` and can be used separately. API-Documentation Java docs.

Unix domain socket API available in package `org.bluecove.socket` and can be used independently from Bluetooth APIs.