Can Bluetooth be used in Proxmox (passed to a VM or LXC)

bearhntr

Member
Sep 9, 2022
150
9
18
Atlanta, GA USA
I am building a new HA (HomeAssistant instance as a VM under Proxmox). The new VM box has the very same WiFi/BT card that the existing ThinClient is using. A PCIe card and I am getting WiFi in BOTH systems - but the new VM does not see the Bluetooth. Again, they are both on the same card. Proxmox is setup and is passing the PCIe into the HA (x86_64) installation. WiFi is working and I am able to connect to my AP and get an IP From both systems.
Done a little research - and it appears that Bluetooth 'is' there under Proxmox. From the SHELL - I am seeing this:

root@pve-ha:~# systemctl cat bluetooth.service
# /lib/systemd/system/bluetooth.service
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/libexec/bluetooth/bluetoothd
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1

# Filesystem lockdown
ProtectHome=true
ProtectSystem=strict
PrivateTmp=true
ProtectKernelTunables=true
ProtectControlGroups=true
StateDirectory=bluetooth
StateDirectoryMode=0700
ConfigurationDirectory=bluetooth
ConfigurationDirectoryMode=0555

# Execute Mappings
MemoryDenyWriteExecute=true

# Privilege escalation
NoNewPrivileges=true

# Real-time
RestrictRealtime=true

[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service

From what I can gather - it is there after installing 'bluetooth' and 'bluez' -- but no idea how to pass it into the HomeAssistant VM. I was able to pass the WiFi into the HA VM by adding the PCIe Adapter
1708462552488.png

1708462601494.png

The Bluetooth is on the same card as the WiFi...it is a PCIe card with antennas on the outside of the machine.
 
The Bluetooth part of such a combined device is often connected to the USB bus (while the WiFi part is connected to the PCIe bus) and can be passed with USB passthrough to a VM.
 
The Bluetooth part of such a combined device is often connected to the USB bus (while the WiFi part is connected to the PCIe bus) and can be passed with USB passthrough to a VM.

Some of the things I have been reading - mention this. I do an 'lsusb' and I get this:
root@pve-ha:~# lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1a86:e050 QinHeng Electronics USB Keyboard-Mouse_V1.7
Bus 002 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@pve-ha:~#

I was thinking it was the 8087:0024 - but cannot figure out how to pass that into the VM. It does not show in the HARDWARE when trying to add USB (this is all I see):

1708463827343.png
 
Some of the things I have been reading - mention this. I do an 'lsusb' and I get this:
I don't see a device that look like what you are looking for.
I was thinking it was the 8087:0024 - but cannot figure out how to pass that into the VM. It does not show in the HARDWARE when trying to add USB (this is all I see):
I think "hub" devices are filtered out, as you can only USB passthrough specific devices (and not whole hubs).

Maybe your Bluetooth device is not connected via USB. Maybe it's connected via a i2c bus, like some laptops?
 
But none of that makes any sense to me.

Also found this:

root@pve-ha:~# journalctl -b | grep Bluetooth
Feb 20 15:43:37 pve-ha kernel: Bluetooth: Core ver 2.22
Feb 20 15:43:37 pve-ha kernel: Bluetooth: HCI device and connection manager initialized
Feb 20 15:43:37 pve-ha kernel: Bluetooth: HCI socket layer initialized
Feb 20 15:43:37 pve-ha kernel: Bluetooth: L2CAP socket layer initialized
Feb 20 15:43:37 pve-ha kernel: Bluetooth: SCO socket layer initialized
Feb 20 16:18:28 pve-ha systemd[1]: Starting bluetooth.service - Bluetooth service...
Feb 20 16:18:28 pve-ha bluetoothd[26555]: Bluetooth daemon 5.66
Feb 20 16:18:28 pve-ha systemd[1]: Started bluetooth.service - Bluetooth service.
Feb 20 16:18:28 pve-ha bluetoothd[26555]: Bluetooth management interface 1.22 initialized
Feb 20 16:18:28 pve-ha kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Feb 20 16:18:28 pve-ha kernel: Bluetooth: BNEP filters: protocol multicast
Feb 20 16:18:28 pve-ha kernel: Bluetooth: BNEP socket layer initialized
 
I don't see a device that look like what you are looking for.

I think "hub" devices are filtered out, as you can only USB passthrough specific devices (and not whole hubs).

Maybe your Bluetooth device is not connected via USB. Maybe it's connected via a i2c bus, like some laptops?

The Bluetooth and WiFi 6E are both on a PCIe card plugged into a PCI slot on the motherboard.
 
...and to top it off -- on a reboot, you get this unless you START Bluetooth with the following [ systemctl start bluetooth ]

1708465041503.png


So have to figure out how to get things to Auto-Start - and then pass them through. :-(
 
The Bluetooth and WiFi 6E are both on a PCIe card plugged into a PCI slot on the motherboard.
Yes, but they are often not both connected via the PCIe bus, when connected via a M.2 slot (which can contain several busses). But it guess yours really is a PCIe x1 add-in card or something? Then I guess you need to PCIe passthrough the whole card/device (all functions) to a VM.

Do you passthrough the WiFi device? Do you lose Bluetooth on the Proxmox host, when you do?
...and to top it off -- on a reboot, you get this unless you START Bluetooth with the following [ systemctl start bluetooth ]

View attachment 63474


So have to figure out how to get things to Auto-Start - and then pass them through. :-(
I don't understand what you are telling me this means, sorry.
 
Yes, but they are often not both connected via the PCIe bus, when connected via a M.2 slot (which can contain several busses). But it guess yours really is a PCIe x1 add-in card or something? Then I guess you need to PCIe passthrough the whole card/device (all functions) to a VM.

Do you passthrough the WiFi device? Do you lose Bluetooth on the Proxmox host, when you do?

I don't understand what you are telling me this means, sorry.

I passed through the ENTIRE CARD (with ALL FUNCTIONS). It is not an M.2 card (well it is - but it is mounted to a PCI card - it looks just like this. (the pins on the back of the card are not for USB - they are Jumpers to allow more than one card to be in the system. The connector on the outside is for the antenna (shown below).

1708523949805.png 1708524139801.png

I have followed multiple guides to get the Bluetooth working. I had to install Bluetooth and Bluez from the SHELL to even get part of what I am finding.

The lspci -vk infomation for the card is as follows - there is nothing there about Bluetooth or USB:

02:00.0 Network controller: Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz (rev 1a)
Subsystem: Intel Corporation Wi-Fi 6 AX210 160MHz
Flags: bus master, fast devsel, latency 0, IRQ 18, IOMMU group 12
Memory at f7c00000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [c8] Power Management version 3
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [40] Express Endpoint, MSI 00
Capabilities: [80] MSI-X: Enable+ Count=16 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [14c] Latency Tolerance Reporting
Capabilities: [154] L1 PM Substates
Kernel driver in use: vfio-pci
Kernel modules: iwlwifi

If we are thinking that that Bluetooth on that card is using USB - here is the information for the "one" that I think it could be - as it is "Intel"

root@pve-ha:~# lsusb -v

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x8087 Intel Corp.
idProduct 0x0024 Integrated Rate Matching Hub
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 12
Hub Descriptor:
bLength 11
bDescriptorType 41
nNbrPorts 8
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00 0x00
PortPwrCtrlMask 0xff 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0100 power
Port 6: 0000.0100 power
Port 7: 0000.0100 power
Port 8: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
 
I must admit that I don't understand how Bluetooth could work unless the PCIe x1 add-in card contains a PCIe multiplexer and a additional USB controller. But the add-in card appears to only contain a single function: the WiFi controller (and all your USB controllers appear to come from the motherboard chipset). Maybe someone else knows how this works and can help you, sorry.
 
I must admit that I don't understand how Bluetooth could work unless the PCIe x1 add-in card contains a PCIe multiplexer and a additional USB controller. But the add-in card appears to only contain a single function: the WiFi controller (and all your USB controllers appear to come from the motherboard chipset). Maybe someone else knows how this works and can help you, sorry.
As a test last night - I have another system JUST LIKE THIS one, with only 8GB of RAM and a real HDD (every thing else is identical)...and I performed an installation of DEBIAN 12 (Bookworm) using full defaults (graphical) during the installation.

Once I got to the end and it wanted to reboot - it booted to the GNOME desktop, and low-and-behold the Network Icon at the top when I clicked it was showing me WIFI and BLUETOOTH. I was able to access the BLUETOOH stuff and perform a SCAN. It saw 4 items in my home (and 3 are on the other end of the house (WOW!!!) and displayed them on the screen. It also allowed me to connect to the WiFi. There were indications that the Bluetooth was indeed on the USB bus, and not a PCI bus.

I meant to take some screen shots - but also then turned around and installed WINDOWS 10 on the same box, wiping out the DEBIAN. It too - immediately saw the INTEL AX210 card and setup the WiFi and Bluetooth in Device Manager.

I am guessing that the PROXMOX installation does not see it (due to its minimalistic Debian installation) - and wonder how I get it working properly. How do I engage the Proxmox developers to get this fixed? or a set of instructions on "Adding Bluetooth".
 
Do an lspci & lsusb before installing the card and then do lspci & lsusb after installing it. Note ALL differences, and you may be wiser.
 
Do an lspci & lsusb before installing the card and then do lspci & lsusb after installing it. Note ALL differences, and you may be wiser.
I actually - finally got a response from the manufacturer of the PCI card - it requires a USB connection from it to the motherboard to make Bluetooth work. The guy was surprised that I ever got it to show up at all in Linux without the USB connection. I told him that both cards that bought (to put into the PCI slot and add my own M.2 adapter) did not have 'said cable'.

He stated there were a batch of them sold/shipped without them. He is sending them to me - said may take 2-3 weeks. I will test this all again when I get the cables.
 
I actually - finally got a response from the manufacturer of the PCI card - it requires a USB connection from it to the motherboard to make Bluetooth work. The guy was surprised that I ever got it to show up at all in Linux without the USB connection
I find this situation to be IMPOSSIBLE.
Assuming the OP used 2 identical PCI wifi/bt cards - (neither having the "said cable" connected to the motherboard?) why would it be seen in one machine & not in the other. I don't think native debian or proxmox is going to make a difference.
How about swapping the cards from one machine to the other, and see what happens.
 
I find this situation to be IMPOSSIBLE.
Assuming the OP used 2 identical PCI wifi/bt cards - (neither having the "said cable" connected to the motherboard?) why would it be seen in one machine & not in the other. I don't think native debian or proxmox is going to make a difference.
How about swapping the cards from one machine to the other, and see what happens.
I agree - According to the guy I was talking with about it 'showing' on one and not on the other -- he was shocked too. Although it showed as "Running" - I could not get it to scan or do anything at all. So I am lead to believe it was not really "Running".

I tested my HP T620+ using the same WiFi INTEL AX210 card that is on these PCI cards (it plugs directly into the motherboard into an M.2 slot) - it immediately shows WiFi and Bluetooth working and enabled on install of Ubuntu - did not try Debian there.

I have another HP T620 (non-Plus model) which is where my HomeAssistant is running now - has the same card. I replaced the WiFi card there - which only gave me WiFi, and removed the Bluetooth dongle - powered it on--- and HomeAssistant saw both of them. I had not make no changes there either.

It appears (and from what I read) - that Linux "LOVES" the Intel wifi cards - and "hates" the Broadcom ones. :) :)
 
I tested my HP T620+ using the same WiFi INTEL AX210 card that is on these PCI cards (it plugs directly into the motherboard into an M.2 slot) - it immediately shows WiFi and Bluetooth working and enabled on install of Ubuntu - did not try Debian there.
The M.2 slot probably also connects to USB (and SATA, that's what the different "keys" are for), while a PCIe card does only PCIe.
It appears (and from what I read) - that Linux "LOVES" the Intel wifi cards - and "hates" the Broadcom ones. :) :)
OpenWRT does not run on Broadcom devices because they don't provide open source drivers (or help development), while Intel usually does, so I'm not surprised.
 
guys i think i can shed some light here.

if you use the intel wifi cards in a proper m.2 slot, it has both usb and pcie lanes at the same time, that is why you see the usb bluetooth without additional cable.
if you use it with a pcie to m.2 adapter card it only has the pcie lanes connected, but no usb.
thats why you dont see the usb bluetooth.
my intel cards that came with adapters always had a seperate usb-cable that connects the pcie card to an internal usb-2.0 header.
i dont know of any pcie adapter cards where bluetooth works without the extra usb cable (which normally is delivered with the adapter card).
you can see such a cable on this screenshot of a card on aliexpress:
1708978782195.png
 
  • Like
Reactions: bearhntr
guys i think i can shed some light here.

if you use the intel wifi cards in a proper m.2 slot, it has both usb and pcie lanes at the same time, that is why you see the usb bluetooth without additional cable.
if you use it with a pcie to m.2 adapter card it only has the pcie lanes connected, but no usb.
thats why you dont see the usb bluetooth.
my intel cards that came with adapters always had a seperate usb-cable that connects the pcie card to an internal usb-2.0 header.
i dont know of any pcie adapter cards where bluetooth works without the extra usb cable (which normally is delivered with the adapter card).
you can see such a cable on this screenshot of a card on aliexpress:
View attachment 63799

I finally got the PCIe card that I ordered - the first order shipped wrong card. I now have the INTEL AX210 in my system with proxmox installed and it is seen inside HomeAssistant (once setting up IOMMU and passing through the PCI (WiFi) and USB 8087:0032 to the HA instance.

Still think something is wrong - as I only see this:

1710871493651.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!