Bluetooth adapter not usable on home assistant running in a VM

I used this post, Home Assistant OS in KVM with USB Bluetooth adapter passthrough - #3 by wmaker as somewhat of a guide, and was finally able to see my onboard bt adapter from my old gaming laptop (Lenovo Legion y720) running NixOS now. I have haos configured via a VM now.

> lsusb | grep Blue
Bus 001 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface

Here is the bt-device config

<hostdev mode='subsystem' type='usb' managed='yes'>
  <source>
    <vendor id='0x8087'/>
    <product id='0x0a2b'/>
  </source>
  <address type='usb' bus='0' port='6'/>
</hostdev>

Note: I am able to scan for devices from my host machine

I am able to see the hardware but it does not show up as a bluetooth device on my home-assistant

Looking at dmesg, i get the following lines for bluetooth

[    5.182857] Bluetooth: Core ver 2.22
[    5.182880] Bluetooth: HCI device and connection manager initialized
[    5.182884] Bluetooth: HCI socket layer initialized
[    5.182886] Bluetooth: L2CAP socket layer initialized
[    5.182892] Bluetooth: SCO socket layer initialized
[    5.867760] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
[    5.868770] Bluetooth: hci0: Device revision is 16
[    5.868775] Bluetooth: hci0: Secure boot is enabled
[    5.868776] Bluetooth: hci0: OTP lock is enabled
[    5.868778] Bluetooth: hci0: API lock is enabled
[    5.868779] Bluetooth: hci0: Debug lock is disabled
[    5.868781] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    5.877543] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[    6.442742] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    6.442748] Bluetooth: BNEP socket layer initialized
[    7.369880] Bluetooth: hci0: Waiting for firmware download to complete
[    7.370758] Bluetooth: hci0: Firmware loaded in 1458213 usecs
[    7.370861] Bluetooth: hci0: Waiting for device to boot
[    7.383795] Bluetooth: hci0: Device booted in 12708 usecs
[    7.384095] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-12-16.ddc
[    7.386803] Bluetooth: hci0: Applying Intel DDC parameters completed
[    7.387805] Bluetooth: hci0: Firmware revision 0.1 build 19 week 44 2021
[    7.389805] Bluetooth: hci0: Reading supported features failed (-16)
[    7.389835] Bluetooth: hci0: Error reading debug features
[    7.389839] Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.
[    7.441011] Bluetooth: MGMT ver 1.23
[10879.812288] Bluetooth: hci0: Firmware revision 0.1 build 19 week 44 2021
[10879.815233] Bluetooth: hci0: Reading supported features failed (-16)
[10879.815324] Bluetooth: hci0: Error reading debug features
[10879.815363] Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.

The bottom of that post contains errors quite similar to yours. A further edit points to this as the proper way to pass through the PCI device (You will probably only need Part II in that github post).

Personally, I think trying to use the internal bluetooth adapter is a pretty involved process and not worth the hassle. I would go for a USB adapter on the supported list or else an ESP bluetooth proxy and keep things simple.

Yes, most likely your Intel device is an integrated combo of Bluetooth and WiFi, so it is insufficient to just pass-thru the USB portion; You have to pass-through the PCI device otherwise you get these failures (that was the fix I edited part at the end of my post).

Getting a USB BT Adapter would indeed be way easier.

1 Like

Ah it was fairly straightforward after blacklisting kernel modules for bluetooth. As @ShadowFist suggested on following Part 2 of the post.

I don’t see a usecase of using Bluetooth on the main system so this should be fine for now! Saved 15$.

Thanks everyone!