CSR8510 A10 dongle not found
Hi, I've already connected to linux machine a dongle recognized as CSR8510 A10 in patch /dev/bus/usb/001/094 bluez installed: ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled) Active: active (running) since śro 2018-03-14 20:46:28 CET; 2h 14min ago Docs: man:bluetoothd(8) Main PID: 16324 (bluetoothd) Status: "Running" CGroup: /system.slice/bluetooth.service └─16324 /usr/libexec/bluetooth/bluetoothd
mar 14 20:46:28 omvserver bluetoothd[16324]: Bluetooth daemon 5.47 mar 14 20:46:28 omvserver bluetoothd[16324]: Starting SDP server mar 14 20:46:28 omvserver systemd[1]: Started Bluetooth service.
Bindings installed based on tutorial and it's still not recognized in openhab. What more should I check?
Hi @orzechszek, what does bluetoothctl say? Does it show you your adapter? For example:
pi@raspberrypi:~ $ bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX AZIO - Entrance hall [default]
[NEW] Controller XX:XX:XX:XX:XX:XX Internal Adapter - Kitchen
Agent registered
[bluetooth]#
No... [NEW] Controller XX:XX:XX:XX:XX:XX BlueZ 5.47 [default] So, it seems that bluez don't recognize my adapter?
Not sure I get that, you've just posted an output of the tool with an adapter (00:1A:XX:XX:XX:03)... Is this your adapter?
It was response of mentioned command. //# bluetoothctl [NEW] Controller 00:1A:7D:DA:71:03 BlueZ 5.47 [default] Agent registered
How many adapters are in your system? As far as I can see, you've got 1 adapter connected. Is this what you would expect? Do you expect the "00:1A:XX:XX:XX:03" adapter to be recognized by the binding, but it is not showing up there?
It's my adapter. I've just performed a test: disconnect and check if it appears. Command response was empty. When I connected again it appears. So, system recognizes it, but it not showing in openhab.
Something more can I do ?
yes, could you please check what versions of the binding you are running. In the karaf console:
openhab> bundle:list | grep bluetooth
Please post here the output of that command
247 ¦ Active ¦ 80 ¦ 1.1.1 ¦ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth.transport.tinyb 248 ¦ Active ¦ 80 ¦ 1.1.4 ¦ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth 249 ¦ Active ¦ 80 ¦ 1.2.1 ¦ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth.transport.bluegiga
Good. Do you use bluegiga adapters? If not, you may uninstall bluegiga transport binding.
Here is another thing to check: 'openhab' user permission. Can you pls post here the content of that file: /etc/dbus-1/system.d/bluetooth.conf
Ok, uninstalled.
from bluetooth.conf
<policy group="bluetooth"> <allow send_destination="org.bluez"/> </policy>
:/# groups openhab openhab : openhab bluetooth
ok, have you added 'openhab' user to the 'bluetooth' group in your OS?
yes, command from bash: :/# groups openhab openhab : openhab bluetooth
ok. Next step is to look in the OH logs, can you please enable DEBUG level for the binding in the karaf console?
log:set DEBUG org.sputnikdev.bluetooth.manager.impl
And then capture some logs and post it here.
No information about bluetooth. Should I restart openhab or something? I've just disconnect and connect again a dongle. Still no info.
Are you saying that log:tail does not give you any log entries for the bluetooth binding?
no
ok... sounds strange. Please leave DEBUG level and then restart OH, and then quickly open karaf console so that you could see the log from the beginning. Looks like the binding is failing to start or something, so we need to see logs from the beginning of the start.
00:00:59.383 [ERROR] [ome.binding.bluetooth.transport.tinyb] - [binding.bluetooth.transport.tinyb.activator(254)] The activate method has thrown an exception java.lang.IllegalStateException: Could not load native libraries for TinyB at org.sputnikdev.esh.binding.bluetooth.transport.tinyb.activator.TinyBActivator.activate(TinyBActivator.java:19) [247:org.sputnikdev.org.eclipse.smarthome.binding.bluetooth.transport.tinyb:1.1.1] 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.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:298) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:109) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:749) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:675) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:430) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:390) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254) [43:org.apache.felix.scr:2.0.12] at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227) [43:org.apache.felix.scr:2.0.12] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?] at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156) [?:?] at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?] at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?] at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
That's better. What OS and CPU are you using?
Intel(R) Celeron(R) CPU J3455 OpenMediaVault based on debian 8.9
Looks like the TinyB transport does not properly detect your environment. Looks like your OS reports something different to what the transport was built for.
Unfortunately the TinyB transport does not log CPU and OS types. What we can do is:
- I'll make a new build for you to just detect what's reported by our OS ("os.name" and "os.arch" environment properties). You will try to run it and capture what's reported.
- Then I make another build with a fix.
Are you ok to do this? I'll provide 2 jar files that you need to manually install.
Ok. Please prepare. I'll check it tomorrow and let you know. So uninstall and manualny put new in addons?
Yep, uninstall "TinyB Transport" only. Then put provided jar into /usr/share/openhab2/addons. Then capture logs. Then install another version and check if it is working.
The first version will be ready in 15 mins. So if you can wait we could make it quick.
Here we go: https://oss.sonatype.org/content/repositories/snapshots/org/sputnikdev/org.eclipse.smarthome.binding.bluetooth.transport.tinyb/1.1.2-SNAPSHOT/org.eclipse.smarthome.binding.bluetooth.transport.tinyb-1.1.2-20180314.234102-2.jar
First one.
Please enable DEBUG level for the TinyB transport:
log:set DEBUG org.sputnikdev.bluetooth.manager.transport.tinyb
Then restart OH and capture logs from the beginning. You should be able to see entries like that:
OS name: {}; OS arch: {}" isLinux: {}; isARM6: {}; isX86_64: {}; isX86_32: {}
Instead of {} there should be some info about your environment.
But yeah, we can do this tomorrow of course ;)
I've found a better way to determine env properties though the karaf console, please run this:
openhab> system:property | grep os.arch
os.arch=arm
openhab> system:property | grep os.name
org.osgi.framework.os.name=Linux
os.name=Linux
openhab>
So I need this: os.arch= os.name=
os.arch=amd64 os.name=Linux
Cool, thanks. Just to confirm, what JVM are you using? Oracle or OpenJDK?