Home Assistant OS in KVM with USB Bluetooth adapter passthrough

I kinda agree. Just passing along in case someone else sees this thread…

I have an Intel NUC and thought I would give its integrated Bluetooth Adapter a try with HA as a QEMU/KVM Guest.

On the Host:

$lsusb
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth

For the host (Ubuntu 22.0.4 w. kernel Linux version 5.19.0-43-generic), the integrated Adapter seems to come up fine in the kernel. From dmesg:

[    3.483669] usbcore: registered new interface driver btusb
[    3.485864] Bluetooth: hci0: Bootloader revision 0.4 build 0 week 30 2018
[    3.486865] Bluetooth: hci0: Device revision is 2
[    3.486867] Bluetooth: hci0: Secure boot is enabled
[    3.486868] Bluetooth: hci0: OTP lock is enabled
[    3.486869] Bluetooth: hci0: API lock is enabled
[    3.486870] Bluetooth: hci0: Debug lock is disabled
[    3.486871] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    3.501182] Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
[    3.501257] Bluetooth: hci0: Boot Address: 0x24800
[    3.501257] Bluetooth: hci0: Firmware Version: 126-5.22
...
[    5.286948] Bluetooth: hci0: Waiting for firmware download to complete
[    5.287846] Bluetooth: hci0: Firmware loaded in 1744785 usecs
[    5.287902] Bluetooth: hci0: Waiting for device to boot
[    5.302996] Bluetooth: hci0: Device booted in 14766 usecs
[    5.303021] Bluetooth: hci0: Malformed MSFT vendor event: 0x02
[    5.303375] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-19-0-4.ddc
[    5.305097] Bluetooth: hci0: Applying Intel DDC parameters completed
[    5.305995] Bluetooth: hci0: Firmware revision 0.4 build 126 week 5 2022

However after adding this USB device to HA Guest (much like the xml file shown above, plus doing a shutdown, bringup), HAOS shell dmesg sees:

[    2.951226] usbcore: registered new interface driver 
[    5.015097] Bluetooth: hci0: command 0xfc05 tx timeout
[    5.015097] Bluetooth: hci0: Reading Intel version command failed (-110)

and nothing else happens.

HAOS is running Linux version 6.1.29. It sees the USB device and recognizes it as a BT device, and then starts interrogating it only to fail early on with a simple read of its version, so it becomes a failed Bluetooth device, thus HA never bothers with it.

The following thread seems to suggest that the linux kernel may have issues with these family of Intel devices over a variety of kernel versions. I just don’t know really if this is the problem or not, but I have not yet had any success getting this to work.

One person in that thread said that performing PCI passthrough (instead of USB pass-through) worked for him…but I’m not willing to go through the trouble to try it out (not yet anyway)

[Edit/Update] I did get around to performing PCI Passthrough of my AX201, and it now works. Here is a brief write up I did.