wiki.webvm.net/ bluetooth

Building BlueCove-Bluez

BlueCove-Bluez is a JSR-82 Bluetooth stack implementation of the Linux bluetooth stack Bluez

Preparation

To get a copy, checkout the source code:

; svn co http://bluecove.googlecode.com/svn/

You need to install Maven from Apache in order to build the bluecove-gpl part, which provides the base for BlueCove to work on the Bluez stack.

Besides this you also need to install the libbluez2-dev package under Debian/Ubuntu or the equivalent on your Linux distribution. Note, I use still JDK 1.4 to compile and run the Java portions of bluecove.

Build

; cd svn/bluecove-gpl/trunk
; mvn -Dmaven.test.skip=true

Troubleshooting

There might be missing dependencies during the build, I did the following to work around them:

Grab bluecove-2.0.3-YYYYMMDD.xxxxxx-yy.jar from the bluecove homepage in order to unjar it:

; cd target
; jar xf bluecove-2.0.3-YYYYMMDD.xxxxxx-yy.jar
; cd ..
; mvn -Dmaven.test.skip=true

Afterwards, the important stuff will be in the target/ directory.

Building BlueCove for ARM

Preparation

  1. Download bluez-libs-3.24.tar.gz and cross-compile this using the maemo toolchain.
  2. Apply the following patch

    ; cd bluecove-gpl ; patch -p0 < bluecove-gpl_pom.patch

Note, of course you will need to change the paths according to your setup, in my setup the directory

/home/anselm/aplix/bluecove-linux/arm

contains the cross-compiled arm version of bluez-libs. And the arm-gcc crosscompiler might be in a different location in your setup as well.

Build

; mvn

Installation

; scp -r target/classes <target device>

Enjoy BlueCove-Bluez on your ARM-based device!

Nokia

To find your btaddress:

*#2820#

Debian Thinkpad

x61:~% cat /proc/acpi/ibm/bluetooth
status:         enabled
commands:       enable, disable

x61:~% sudo /etc/init.d/bluetooth restart
Restarting bluetooth: hcid.

There seems to be some permission bug as the default user in the dialout group isn’t enough to properly use the bluetooth. udev is supposed to set this up I think.

So under root sudo su investigate with:

btscanner

sdptool browse

hcitool scan
hcitool info

There are bugs seemgingly as some tools can’t properly query the name.

Keep the address of your device you want to interrogate handy, e.g. 00:17:E3:85:42:F2

Oddly only sdptool properly discovered the interesting SIM ACCESS service:

Service Name: SIM Access
Service RecHandle: 0x10010
Service Class ID List:
  "SIM Access" (0x112d)
  "Generic Telephony" (0x1204)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "SIM Access" (0x112d)
    Version: 0x0101

Related