You are not logged in.

#1 2020-07-14 11:43:23

klesk
Member
Registered: 2020-07-14
Posts: 2

Bluetooth in a systemd-nspawn container

Hi,

i am trying to run Bluetooth inside a systemd-nspawn container, apparently with no luck.
At the moment is the only method, which is successful, to start bluetooth on the host and pass the hidraw device to the container.

When i try to run Bluetooth inside the container i get multiple permission denied errors

bluetoothd[47]: Failed to add UUID: Permission Denied (0x14)
bluetoothd[47]: Failed to add UUID: Permission Denied (0x14)
bluetoothd[47]: Failed to load link keys for hci0: Permission Denied (0x14)
bluetoothd[47]: Failed to load LTKs for hci0: Permission Denied (0x14)
bluetoothd[47]: Failed to load IRKs for hci0: Permission Denied (0x14)
bluetoothd[47]: hci0 Load Connection Parameters failed: Permission Denied (0x14)
bluetoothd[47]: Failed to add UUID: Permission Denied (0x14)
bluetoothd[47]: Failed to set device class: Permission Denied (0x14)
bluetoothd[47]: Failed to set local name: Permission Denied (0x14)
bluetoothd[47]: Failed to set mode: Permission Denied (0x14)

The cmd i start the container

systemd-nspawn -b -D /var/lib/machines/gamebox \
	--bind-ro=/tmp/.X11-unix \
	--bind=/run/user/1000/pulse:/run/user/host/pulse \
	--bind=/dev/dri \
	--bind=/dev/shm \
	--bind=/dev/snd \
	--bind=/dev/input \
	--bind=/dev/uinput \
	--bind=/var/cache/pacman/pkg \
	--property=DeviceAllow="/dev/dri/renderD128" \
	--property=DeviceAllow="char-usb_device rwm" \
	--property=DeviceAllow="char-input rwm" \
	--property=DeviceAllow="char-hidraw rwm" \
	--property=DeviceAllow="/dev/uinput" 

The "--property=DeviceAllow="char-hidraw rwm" " doesn't seem to have any effect and was just for testing purpose.
Maybe if someone has an idea, i would be very thankful.

With kind regards

klesk

Offline

#2 2020-07-14 13:00:04

klesk
Member
Registered: 2020-07-14
Posts: 2

Re: Bluetooth in a systemd-nspawn container

Ok, when i start the container with

--capability="CAP_NET_ADMIN"

it kind of works, i can connect bluetooth devices in the container.
But the corresponding hidraw device is only visible on the host and not accessible through the container.

Last edited by klesk (2020-07-14 13:12:56)

Offline

Board footer

Powered by FluxBB