Posts: 1
Joined: Wed Jul 25, 2018 5:57 am

BlueCove-bluez-DBus with DBus 5.xx

Wed Jul 25, 2018 6:29 am

Hi everyone
So I'm working on a university project, Self driven specialization project to prove what I learned over the years. Part of the project I have defined requires Bluetooth on a Raspberry Pi. This is all within Java for the sake of portability though I have quickly learned that the state of Bluetooth API's for Linux is not great... In fact all the newer API's I have found are incomplete and unusable. The older ones? incompatible with newer versions of Bluez.

That's the bad news, The good news is for the time being, I don't need to use newer software like Bluez 5, I can use Bluez 4.

I settled on BlueCove-Bluez-DBus as it did not require a GPL license unlike their BlueCove-Bluez-GPL but it requires working over DBus. Great!

After spending a week debugging issues with Natives (Same issues found here viewtopic.php?p=1270476) I went ahead and tried using the API. The issue is Bluez has changed a lot over the last 10 years. Mainly the native methods used Bluez v3 and v4 are now depricated and removed in bluez 5.xx and so in turn I get a nice error when using BlueCove-Bluez-DBus.
Method "ListAdapters" with signature "" on interface "org.bluez.Manager" doesn't exist
So BlueCove won't work with Bluez 5 in it's current state.
Two options
Option one:
Build my own extension on BlueCove-Bluez-DBus that implements the now supported methods
This requires learning DBus, Bluez and how to communicate with Bluez over dbus.
This also requires writing my own natives to support the newer interfaces.
This is a huge amount of work since the first time I have had to work with JNI is this month.
Option two:
Downgrade Bluez to version 4.101 and call it a day.
Only issue is I'm not exactly proficient with installing software outside of apt-get and it appears since Bluez v4 is deprecated, it's no longer available through the available repositories.

So this is where I need help.
Obviously, rebuilding BlueCove to support more modern versions of Bluez would be great for native support and benefit the linux community by updating an API that has fallen into a deprecated state. (I will probably do this anyway at some point in the future) But I have very limited time. I have already spent over 2 weeks trying to get a Bluetooth API working and I only have 2 months left to not only get Bluetooth functionality working but to work on a large assortment of other features for both the Android and Linux side. Building databases, SSL implementation, More network tools along side two other papers.

So, Does anyone know how to either downgrade Bluez to v4 from v5 OR, have a functioning Java bluetooth API that will work, has documentation and the sort.
I'm starting to get desperate as time keeps ticking by and I have deadlines to meet.

Thank you

User avatar
The Traveler
Posts: 360
Joined: Sat Oct 21, 2017 3:48 pm

Re: BlueCove-bluez-DBus with DBus 5.xx

Wed Jul 25, 2018 1:18 pm

Do this: ... stallation
with this:

There's still the possibility of incompatibility with dbus but you'll have the bluez version you want to test it with.

Good luck.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

Return to “Advanced users”