(SOLVED) BlueZ JNI connection cannot be established. OpenHab 2.5 + Bluez 5.47 on Rasp

thing

Bridge bluetooth:bluez:hci0 [ address=“B8:27:FB:F6:F6:F6”, discovery=false ]

24

2019-05-26 18:02:01.446 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler@1400f1a': BlueZ JNI connection cannot be established. java.lang.IllegalStateException: BlueZ JNI connection cannot be established. at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:94) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] 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) [133:org.openhab.core:2.5.0.201905250301] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [133:org.openhab.core:2.5.0.201905250301] 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.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:92) ~[?:?] ... 10 more

I think it has something to do with tinyb but I am not sure.

hcitool dev gives back my controller with the correct Mac

sudo service bluetooth status

● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-05-26 16:54:10 CEST; 3h 2min ago
Docs: man:bluetoothd(8)
Main PID: 5215 (bluetoothd)
Status: “Running”
CGroup: /system.slice/bluetooth.service
└─5215 /usr/libexec/bluetooth/bluetoothd

mei 26 16:54:10 homedomo systemd[1]: Starting Bluetooth service…
mei 26 16:54:10 homedomo bluetoothd[5215]: Bluetooth daemon 5.47
mei 26 16:54:10 homedomo bluetoothd[5215]: Starting SDP server
mei 26 16:54:10 homedomo systemd[1]: Started Bluetooth service.
mei 26 16:54:10 homedomo bluetoothd[5215]: Bluetooth management interface 1.14 initialized

also installed

#Eclipse IoT Market misc-market - 2.5.0.SNAPSHOT

hope anyone can shine a light on this.

1 Like

problem was that the following files were not in my path
libjavatinyb.so
libtinyb.so

sudo cp /srv/openhab2-sys/addons/openhab2-addons/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libjavatinyb.so /usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/aarch32/


sudo cp /srv/openhab2-sys/addons/openhab2-addons/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libtinyb.so /usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/aarch32/

2 Likes

Can you explain it a little bit more?
Your path I canot find in my openhab installation. What ist the base path where you found the *.so files?

My openhab-cli info:
OPENHAB_HOME | /usr/share/openhab2
OPENHAB_RUNTIME | /usr/share/openhab2/runtime
OPENHAB_USERDATA | /var/lib/openhab2
OPENHAB_CONF | /etc/openhab2

have you installed the bluetooth bluez binding? if not install that. then you should have the files :slight_smile:

Hi,
I have the same problem. I have checked and also I cannot find the *.so files and the indicated directories. I have installed bluetooth bluez binding. Can you help me out?
Thank you.

I have also installed the bluetooth binding, but don’t find the files.
The directory /srv/openhab2-sys/addons/ just contains the jar files I have added manually