Passthrough USB Bluetooth adapter to LXC

vobo70

Well-Known Member
Nov 15, 2017
61
2
48
53
Warsaw, Poland
Hi,
I'm trying to pass:
baseus BA04 usb 2.0 Bluetooth 5.1 adapter
Code:
root@pve1:~# lsusb | grep -i bluetooth
Bus 002 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

root@pve1:~# ls -l /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 130 Sep 30 14:43 /dev/bus/usb/002/003
to lxc container [105] - unprivileged
I added the following to /etc/pve/lxc/105.conf:
Code:
lxc.cgroup.devices.allow: c 189:130 rwm
lxc.mount.entry: /dev/bus/usb/002/003 /dev/bus/usb/002/003 none bind,optional,create=file
but on container i can see USB device:
Code:
root@miscale:~# lsusb | grep -i bluetooth
Bus 002 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
but no device path
in /dev/ there's no 'bus' directory.
Should I create manualy the path: /dev/bus/usb?
Maybe that's why bluetooth can't find any BTLE devices?
Can anyone help me?
Thank you in advance,
Regards,
Maciek
 
There is no point in mounting the /dev/bus/usb because the exact path will change when plugging and unplugging stuff. Also, udev does not run in the container and therefore does not add the actual device nodes when USB is plugged in. And no device drivers can be loaded from within the container

Usually, you bind mount the device folder (/dev/dvb for TV tuners, /dev/net/... for network devices, etc.) and make sure to idmap the corresponding user/group from the host to the container. And make sure to load all drivers that are required on the host. And you cannot plug-in the device while the container is running, it will need a restart. I don't know which paths, device nodes and groups you need for bluetooth.

I do know that USB passthrough of a bluetooth controller to an actual VM works fine, because udev will trigger inside a VM and load the necessary drivers and you even have a virtual desktop/GUI to configure the connected devices
 

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!