[vserver] bluetooth from guest?

From: Tor Rune Skoglund <trs_at_swi.no>
Date: Tue 30 Aug 2016 - 10:01:39 BST
Message-ID: <fcdda9c5-d6a7-2a71-a392-80cc98d227d7@swi.no>

Hi List,

any suggestion on the best way to let a guest address and fully control
a specified bluetooth device?

It seems like hcitool creates a socket, and when it tries to write to
it, it fails - as expected. (The relevant part of strace is below.)

In other cases where we need hardware access to a device from a guest,
we have just created the corresponding device node inside the guest, but
I cannot see that the "raw" bluetooth device is present as a device node
in /dev ... (?) (I'm no expert on this, so I am sure that I miss
something.... ;)

Any pointers before I start RTFM ? ;)

- Tor Rune Skoglund, trs@swi.no

socket(PF_BLUETOOTH, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
ioctl(3, 0x800448d3, 0xbff1f650) = 0
close(3) = 0
socket(PF_BLUETOOTH, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
ioctl(3, 0x800448d3, 0xbff1f690) = 0
close(3) = 0
socket(PF_BLUETOOTH, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
bind(3, {sa_family=AF_BLUETOOTH,
sa_data="\0\0\0\0\0U\206\323\0\fm\267&\247"}, 6) = 0
setsockopt(3, SOL_IP, IP_TTL,
"\20\0\0\0\377\377\377\377\377\377\377\377\0\0\0\0", 16) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb771f000
write(1, "< HCI Command: ogf 0x08, ocf 0x0"..., 44< HCI Command: ogf
0x08, ocf 0x000a, plen 1
) = 44
write(1, " 01 \n", 6 01
) = 6
writev(3, [{"\1", 1}, {"\n \1", 3}, {"\1", 1}], 3) = -1 EPERM (Operation
not permitted)
dup(2) = 4
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
brk(0) = 0x80039000
brk(0x8005a000) = 0x8005a000
fstat64(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb771e000
write(4, "Send failed: Operation not permi"..., 37Send failed: Operation
not permitted
) = 37
Received on Tue Aug 30 10:00:43 2016

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 30 Aug 2016 - 10:00:43 BST by hypermail 2.1.8