BlueZ JNI connection cannot be established

Hi,

i use an intel NUC with an internal BLuetooth Adapter.
Openhab2 is the latest stable version.

I would like to create a Bluetooth Bridge. I have read the BLUEZ latest Version was not compatible with openhab2. So i installed the 5.43 Version.

On my UBUNTU 16.04 i can start bluetooth an it seems to work.
Now i create a BLUEZ Bridge in OH2. Add the MAC Address from the Adapter in the properties.
After that i receive the following error in the log:

10:27:17.636 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.eclipse.smarthome.binding.bluetooth.bluez.handler.BlueZBridgeHandler@1d731bac': BlueZ JNI connection cannot be established.

java.lang.IllegalStateException: BlueZ JNI connection cannot be established.
at org.eclipse.smarthome.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:89) [230:org.eclipse.smarthome.binding.bluetooth.bluez:0.10.0.oh230]
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.UnsatisfiedLinkError: tinyb.BluetoothManager.getNativeAPIVersion()Ljava/lang/String;
at tinyb.BluetoothManager.getNativeAPIVersion(Native Method) ~[?:?]
at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:304) ~[?:?]
at org.eclipse.smarthome.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:87) ~[?:?]
… 9 more
10:27:17.655 [ERROR] [home.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing ‘bluetooth:bluez:f1fbc682’: BlueZ JNI connection cannot be established.
java.lang.IllegalStateException: BlueZ JNI connection cannot be established.
at org.eclipse.smarthome.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:89) [230:org.eclipse.smarthome.binding.bluetooth.bluez:0.10.0.oh230]
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.UnsatisfiedLinkError: tinyb.BluetoothManager.getNativeAPIVersion()Ljava/lang/String;
at tinyb.BluetoothManager.getNativeAPIVersion(Native Method) ~[?:?]
at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:304) ~[?:?]
at org.eclipse.smarthome.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:87) ~[?:?]
… 9 more

The Bridge is not “online”.

Can anybody help?

Thanks.
Regards
Hermann

Did you ever find a solution @hermann1514? I’ve the same issue.

BlueZ 5.43 on a Odroid C2. With this adapter.

No. Sorry. But i don’t have found any soloution.

Is it working for you now?

Unfortunately not.

I also tried with the 3rd party Bluetooth bridge, but that is also giving me problems.

Hi,

Same issue on Debian 9 with BlueZ 5.43.
Try with OpenJDK 8 and Zulu 8 with 2 different adapters.

I’m having the same issue here, trying to get beacons for presence.
@n0un0 have you added openhab to the bluetooth group?
I have, but haven’t had the time to install OpenJDK, maybe that could work?

Yes, I have.

I need it for presence too.
I don’t have a solution.

@n0un0 I have tried installing the 3rd party bluetooth binding and it is able to hook into the bluetooth adapter no problem. It throws some errors in the log, but it works. I have not had time to see if it can detect my phones yet.

I have also been reading up about this FIND3 app and it looks promising. More accurate and reliable data, even does indoor position with purported accuracy. I’m hoping to have some time to make a start at getting that setup, private server and all, this weekend. I may not have enough WiFi APs running though

Finally, I use the Network bindings to detect ours smartphones (iPhone).

I decided not to use the Peebblee beacon, too many errors with the 3rd party binding.

Thank you.