non-blocking hci_inquiry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've been playing with the linux wiimote daemon called Cwiid, and
noticed that while it's waiting for a connection from a wiimote, it's
blocking the bluetooth adapter from doing anything else.

Searching around and looking at the code, I can see it's calling
hci_inquiry() in a loop which is blocking the device.

Does a non-blocking hci_inquiry() function exist? If not, could I get
some help on how to go about writing one?

Looking around, someone mentions that it might be the ioctl() function
called within hci_inquiry() which is causing the blocking, could it be
something as trivial as playing with that?

from lib/hci.c:

int hci_inquiry(int dev_id, int len, int nrsp, const uint8_t *lap,
inquiry_info **ii, long flags)
{
[snip]
        ret = ioctl(dd, HCIINQUIRY, (unsigned long) buf);
        if (ret < 0)
                goto free;


Many thanks,

Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux