bluetooth from guest?

Tor Rune Skoglund <[email protected]>
Newsgroups gmane.linux.vserver
Message-ID <[email protected]>
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, [email protected]


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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.