3rd Party Bluetooth Binding. Beta testers needed

Hi to Everyone,
A couple of weeks ago I’ve started to use Vlad’s bluetooth binding to detect my presence with the help of a Gigaset G-Tag BLE device. From the Openhab perspective everything worked fine in my setup which is made out of three Raspberry Pi Zero W which I’ve positioned around my house. Every ZeroW is running Openhabian with the bluetooth binding and is scanning for the G-Tag.

What I noticed after two days of running this setup… my 2.4GHz Wifi network was suddenly useless because of indifferences. So I did a couple of tests with IPerf and a laptop and I came to realize that as soon as I start to run the binding to scan for my G-Tag it breaks my 2.4GHz Wifi. I mean completly. Even Zigbee (which also works in the 2.4GHz zone) devices like Hue bulbs and Xiaomi devices are unresponsive and a lot of status updates get lost.

Now my question:
Has anybody seen the same issue when using the combination of Pi ZeroWs + Vlad’s Bluetooth Binding + 2.4GHz networks (Wifi/Zigbee)?

I tried to switch the Wifi and Zigbee channels but since I live downtown in the city with tons of other 2.4GHz networks around me it did not help to fix the behaviour.

Regards,
Lemmy

Hi @Lemmy, this is the very first time who reports interference with wi-fi network. There was an issue with serial port detection for ZigBee, are you sure it is not the case (pls read several posts above)? I’m running 4-5 adapters simultaneously (although not on the rpi zero) and do not feel that it somehow makes wi-fi link worse.

Hi @vkolotov,

Did you had a chance already looking into it?
Is there something on my side I can do to help finding the root cause?

Hi @Lemmy

i have similar problems with the RPi3, but only if I use the on board Wifi and BLE device.
With an ethernet connection and the on board BLE device everything works fine.

I think it could be possible this is a problem on RPi side ???

But I have no idea how to find the cause of the problem.

Primary use case here is presence detection I believe? I usually keep my BT off to save battery. BT is dying tech, they are somewhere between ultra low power mesh capable NRF/Zwave and FAT Wifi. BT will die soon.
I wouldn’t like keeping it on just for presence detection.
The wifi HW on smartphones is anyway on and it goes to low power when no network in range. The IFTT app can trigger a command event on OH item when you enter home wifi range.

My BT adapter is not detected by OH. It is working fine from the cli.

Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

In the logs I see only this:

Protocol is unknown. Trying to find factory amongst discovered adapters: /9A:CA:AB:7B

openhab@odroid64:~$ hcitool dev
Devices:
        hci0    00:1A:7D:DA:71:13
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device 4C:65:A8:D7:5C:51 MJ_HT_V1
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  50 20 aa 01 30 51 5c d7 a8 65 4c 0d 10 04 e6 00  P ..0Q\..eL.....
  d8 01                                            ..              
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  c0 b9 e7 66 34 78                                ...f4x          
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  50 20 aa 01 31 51 5c d7 a8 65 4c 0d 10 04 e7 00  P ..1Q\..eL.....
  d9 01                                            ..              
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  c0 b9 e7 66 34 78                                ...f4x          
[NEW] Device AC:2B:6E:80:86:A7 DESKTOP-2FO2GFU
openhab@odroid64:~/bluez/bluez-5.47$ /usr/libexec/bluetooth/bluetoothd --version
5.47

I also have problems with the official BT binding, as described here.

I think my dongle is the issue, but I have no clue what to do. Does anyone have a suggestion for me?

Hi @stfn82, could you please make sure you can use ‘bluetoothctl’ utility (see your adapter there) from command line? This might be something to do with user permissions in OS.

BT is dying tech

This is your very personal (and not very humble) opinion.

You may not use your phone, some ppl use bluetooth beacons that works months and months from a tiny button battery.

1 Like

Hi @curlyel, I’ll try to squeeze this into the current release which I plan to roll out this week. I can’t be 100% sure as I even have not started to look into it yet. Too busy at the moment, sorry.

Nothing to worry about. I’ll be patient :wink:
Anyway - thanks for all your support.

Hello @vkolotov, bluetoothctl is working from from the cli:

openhab@odroid64:~$ bluetoothctl
[NEW] Controller 00:1A:7D:DA:71:13 BlueZ 5.47 [default]
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device 4C:65:A8:D7:5C:51 MJ_HT_V1
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 51 51 5c d7 a8 65 4c 0d 10 04 fa 00 P …QQ..eL…
4c 02 L.
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[NEW] Device F8:F0:63:FC:57:F3 MI Band 2
[CHG] Device F8:F0:63:FC:57:F3 UUIDs: 0000fee0-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 52 51 5c d7 a8 65 4c 0a 10 01 56 P …RQ..eL…V
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 53 51 5c d7 a8 65 4c 0d 10 04 fa 00 P …SQ..eL…
4d 02 M.
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[NEW] Device AC:2B:6E:80:86:A7 DESKTOP-2FO2GFU

It sees my Xiaomi thermometer, Mi Fit band and the desktop from the neighbors.

Hi @stfn82, I suspect TinyB binaries are not registered properly for your odroid. Not sure if anyone here is using odroid…

Do you see any WARN or ERROR messages from that package when you start OH: org.sputnikdev.bluetooth.manager.transport.tinyb?

Could you please enable DEBUG level for it?

openhab> log:info DEBUG org.sputnikdev.bluetooth.manager.transport.tinyb

After that, when it starts, it should print lines like that:

Loading native libraries from the bundle. Environment: {} : {}
OS name: {}; OS arch: {}
isLinux: {}; isARM6: {}; isX86_64: {}; isX86_32: {}

Look for Environment is not supported: {} : {} line as it would indicate that it is not loading properly and we need to fix it.

Cheers

Has anyone / author looked at HA communities solutions and experiences?

Its a shell script based solution, I am no expert on BT, but I feel that thread could help improve our solution.

2 Likes

I’ve been using the binding for a while and it appears to work fine with the Xaiomi BT Temp&Humidity Sensor.

But I noticed lately that the binding isn’t detecting new BT devices.

When I run sudo systemctl status bluetooth

I see:
“Can’t store name for private addressed device /org/bluez/hci0/dev_…” I truncated the BT Mac of the Device it’s getting stuck on. It’s random which device it gets stuck on.

Over and over. I’m running Blue-Z 5.47.

Is the author or any devs still supporting this binding? If not then we need to ask for volunteers.

If i remeber right you should use the 5.43 version, please check the installation instruktion

As far as i know is @vkolotov Vlad still working on the binding and giving support. Why are you asking? There is no service level on answering questions.

Excellent!! Everything going well in your opinion then?
I just made a rough guess that this binding is sufficiently large and complex, the author might need a few helping hands. We should ask for it.

I think a helping hand is always welcome and i thinl on vlads todo list are a lot of topics. So offer your help i am sure it will be appreciated

1 Like

I am always here. I do want to help OH users in general. Thats why I asked for volunteer devs, bcause I am myself no expert nor a fan of BT. :slight_smile: