Hass.io and USB Bluetooth Dongle

I’ve read through the older threads on using USB Bluetooth dongles with Hassio /HassOS, but couldn’t find anything much newer than 2 years. My situation is the following:

I’m running HassIO in a qemu VM on Proxmox on an intel NUC. The NUC does not have builtin Bluetooth, so I bought a USB Bluetooth stick and passed through the physical port to the VM. The BT stick shows up in HassOS:

[    1.826272] usb 2-2: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00
[    1.826892] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.827235] usb 2-2: Product: Bluetooth Radio
[    1.827620] usb 2-2: Manufacturer: Realtek
[    1.827937] usb 2-2: SerialNumber: 

However, the OS does not seem to find or attempt to load the correct firmware, so accessing the device fails:

[    3.875375] Bluetooth: hci0: command 0x1001 tx timeout
[   11.875429] Bluetooth: hci0: RTL: HCI_OP_READ_LOCAL_VERSION failed (-110)

I am at a loss because I don’t have a real shell, but from what I can tell there is nothing in the /lib/firmware directory.

The big Bluetooth driver bash does not seem to include one for this device, which, granted, is pretty new: https://github.com/home-assistant/operating-system/pull/563

Is there any way to make HassIO/HassOS use this Bluetooth dongle?

It appears we have the BT dongle, based on Realtek 5.0 chip RTL8761b. Have you figured out how to make it work with HA?

Btw, Edimax has drivers for this chip here:

Just encountered this error, similar setup with hassos in proxmox on a nuc.It was briefly working fine until i encoutered the same.

Did you every find a solution?

I have a BT dongle with the similar chipset, Realtek 5.0 chip RTL8761a and I got the following errors in the log:

[   13.030552] usb 1-2: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00
[   13.076566] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.110038] usb 1-2: Product: Bluetooth Radio
[   13.147179] usb 1-2: Manufacturer: Realtek
[   13.182644] usb 1-2: SerialNumber: 
[   13.527733] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
[   13.630204] Bluetooth: hci0: RTL: rom_version status=0 version=1
[   13.655964] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761a_fw.bin
[   13.690333] bluetooth hci0: Direct firmware load for rtl_bt/rtl8761a_fw.bin failed with error -2
[   13.723835] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8761a_fw.bin not found

My environment is VirtualBox and Home Assistant OS 5.12.

Do you have anybody a solution to make it work? I just found the firmware but I don’t know how can I include it into the OS. Does someone know it?

There is are a set of changes to HASS OS that may fix this for most people

If Home Assistant is complaining about missing firmware, in a terminal do the following:

#  Based on: https://gist.github.com/rometsch/dfd24fb09c85c1ad2f25223dc1481aaa

# Make firmware directory
mkdir /lib/firmware/rtl_bt/

# install 7zip
apk add p7zip

# Download and extract mpow_BH519A drivers (contains Realtek BT firmware)
wget https://mpow.s3-us-west-1.amazonaws.com/mpow_BH519A_driver+for+Linux.7z

7zip -d mpow_BH519A_driver+for+Linux.7z

# For Realtek RTL8761B chip
mv 20201202_LINUX_BT_DRIVER/rtkbt-firmware/lib/firmware/rtl8761bu_fw /lib/firmware/rtl_bt/rtl8761b_fw.bin
mv 20201202_LINUX_BT_DRIVER/rtkbt-firmware/lib/firmware/rtl8761bu_config /lib/firmware/rtl_bt/rtl8761b_config.bin

# clean up
rm -rf 20201202_LINUX_BT_DRIVER

Reboot the device/VM

1 Like

I have the same error, did anyone find a solution?

Just updated HASSOS OVA to 6.0.RC3 and noticed that bunch of RTL87xx firmware was added. But my RTL8761b still reproduces the same behavior as described by the TS. Seems like btrtl.c has an issue with the correct firmware lookup (a/b version mess). @agners could you please check this patch from another project, maybe it’s relevant to our problem as well? Thanks in advance!

1 Like

The Linux kernel we are using already support RTL8761B. However, currently the firmware is missing from the upstream linux-firmware project. Once it will come available, we can add the firmware to the base image. See also Missing firmware file rtl_bt/rtl8761b_fw.bin · Issue #1392 · home-assistant/operating-system · GitHub.