Bluetooth USB Adapter for HassOS (TP-Link UB500 not working?)

I recently moved from the latest Home Assistant Supervised under Raspberry Pi with Debian 11 to the latest Home Assistant Operating System under a Proxmox Virtual Machine. The physical hardware is an HP MiniPC without internal wifi and without any bluetooth.

Previously I was using bluetooth classic and bluetooth low energy device trackers (with the Room Assistant addon, but I don’t think that matters).

So I get a TP-Link UB500 bluetooth USB adapter connected to the phisical machine and passed to the HassOS virtual machine.

The adapter seems somehow found but any scanning result in empty list.

Any experience with this product?
How to get it working, if possible?
If not, what is a usb bluetooth adapter supported in HassOS with my setup?

From what I understand the adapter user a Realtek Bluetooth 8761B radio.

Some info follow.

==========
Physical Machine

root@hub:~# uname -a
Linux hub 5.13.19-6-pve #1 SMP PVE 5.13.19-14 (Thu, 10 Mar 2022 16:24:52 +0100) x86_64 GNU/Linux

root@hub:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 002: ID 2357:0604 TP-Link TP-Link UB500 Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


==========
HassOS Virtual Machine

# uname -a
Linux homeassistant 5.10.103 #1 SMP Wed Mar 9 10:05:18 UTC 2022 x86_64 HAOS

# lsusb
Bus 003 Device 001: ID 1d6b:0003
Bus 002 Device 005: ID 1cf1:0030
Bus 001 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 0627:0001
Bus 002 Device 004: ID 2357:0604
Bus 002 Device 001: ID 1d6b:0002


==========
Home Assistant Container
bash-5.1# uname -a
Linux homeassistant 5.10.103 #1 SMP Wed Mar 9 10:05:18 UTC 2022 x86_64 Linux

bash-5.1# lsusb
Bus 002 Device 004: ID 2357:0604 TP-Link TP-Link UB500 Adapter
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 005: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


bash-5.1# hciconfig dev
hci0:   Type: Primary  Bus: USB
        BD Address: E8:48:B8:C8:20:00  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING
        RX bytes:151950 acl:0 sco:0 events:21152 errors:0
        TX bytes:145892 acl:0 sco:0 commands:17636 errors:0


bash-5.1# hcitool scan
Scanning ...
bash-5.1#


bash-5.1# dmesg | grep -i blue
[    0.344952] Bluetooth: Core ver 2.22
[    0.345362] Bluetooth: HCI device and connection manager initialized
[    0.345860] Bluetooth: HCI socket layer initialized
[    0.346362] Bluetooth: L2CAP socket layer initialized
[    0.346760] Bluetooth: SCO socket layer initialized
**[   16.347796] Bluetooth: hci0: unexpected event for opcode 0x1001**

Hi, did you manage to solve it? I have the same issue. The adapter is found, but i don seem to find anny devices. I’m running Home Assistant OS btw on an HP T620 thin Client.

[bluetooth]# show
Controller E8:48:B8:C8:20:00 (public)
Name: homeassistant
Alias: homeassistant
Class: 0x00000104
Powered: yes
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d053E
Discovering: no
Roles: central
Roles: peripheral
Advertising Features:
ActiveInstances: 0x00 (0)
SupportedInstances: 0x04 (4)
SupportedIncludes: tx-power
SupportedIncludes: appearance
SupportedIncludes: local-name
SupportedSecondaryChannels: 1M
SupportedSecondaryChannels: 2M
SupportedSecondaryChannels: Coded
[bluetooth]# discoverable yes
Changing discoverable on succeeded
[CHG] Controller E8:48:B8:C8:20:00 Discoverable: yes
[bluetooth]# devices
[CHG] Controller E8:48:B8:C8:20:00 Discoverable: no
[bluetooth]#

No, I changed to a UB400 and it’s working.

Has anyone tried this?

The firmware in that posts seemes to be the correct one for the TP-Link UB500.

There is also this thread about the UB500:

I don’t understand why something silly like BLE doesn’t ‘just’ work. I have use the rtl_bt/rtl8761bu_fw.bin for driver, but it times out all the time.

I’m pretty sure i’ve got the latest version FW, but it keeps spitting out messages like:

[ 116.063594] Bluetooth: hci0: command 0x200c tx timeout

After restarting the bluetooth service it starts working again.

I downloaded my FW from:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_bt

the annoying bit is everything is pretty hard to find since I need the ‘bu’ version and it constantly suggests ‘b’ so without the U.

Btw, my LSUSB:

pi@docker:~ $ lsusb
Bus 002 Device 002: ID 04e8:61f5 Samsung Electronics Co., Ltd Portable SSD T5
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 007: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 006: ID 2357:0604 TP-Link TP-Link UB500 Adapter
Bus 001 Device 004: ID 2109:2813 VIA Labs, Inc. VL813 Hub
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So it is the same UB500, but with a newer chipset?

Is there maybe something else I can do? I’m using a Raspberry Pi 4. I soft blocked my onboard BLE device by executing sudo rfkill 2 command to disable the HCI1 adapter.

Maybe a newer FW, experimental, I don’t know

I would be curious to know if theengs gateway works with your setup. If you want to do a test, feel free to go ahead. Theengsgateway is a BLE to MQTT gateway with autodiscovery.
https://gateway.theengs.io/install/install.html#install-theengs-gateway-as-an-add-on-in-home-assistant

You can install it through the addon in the link.
Theengs-Addon-install5

Is there still a problem with UB500? not working for me too… Should I switch to tp link ub4?

Don’t go for tplink, they are both unsupported. I replaced my bt500 with a asus bt5 plug and works much more reliable.

I can only find asus bt4 at my area. what do you think?

See Bluetooth - Home Assistant

There are a couple of supported BLE devices.

3 Likes