logo       

RE: A non-blocking hci_inquiry: msg#00204

Subject: RE: A non-blocking hci_inquiry
The underlying inquiry operation is asynchronous, so there shouldn't be
anything fundamental preveting the code from doing it.  There are three
options that might work:

1) Do it manually with hcitool HCI commands
2) Change the user-level hcitool inquiry command
3) Change the kernel

Not sure which would work best, or exactly how, but I've played with it
enough to know it's possible.

   Trevor

Maybe ponder the following -- which is a snippet of an earlier post on a
different subject:

To do the inquiry, you will want to use the hcitool call:
hcitool [-i hciX] OGF OCF param...
where OGF Is the OpCode Group Field (00-3F), OCF is the OpCode Command
Field (0000-03FF), param... are parameters. Each parameter is a sequence
of bytes. Bytes are entered in hexadecimal form without spaces, most
significant byte first. The size of each parameter is determined based
on the number of bytes entered.  An example to do an inquiry using LAP
0x9E8B33 for 10 _ 1.28 sec and unlimited responses is:
hcitool -i hci 0 01 0001 33 8b 9e 10 00

and to stop the inquiry:
hcitool -i hci0 01 0002


-----Original Message-----
From: Edd Dumbill [mailto:edd@xxxxxxxxxxxxx] 
Sent: Friday, October 31, 2003 2:38 AM
To: Pering, Trevor
Cc: BlueZ Users List
Subject: RE: [Bluez-users] A non-blocking hci_inquiry


On Fri, 2003-10-31 at 06:31, Pering, Trevor wrote:
> It should be possible to simulate an asynchronous discovery with some
> kind of background process that does the inquiry and places the
results
> in a file or something like that

A daemon is one option, but it doesn't seem like the nicest.  For
instance, inquiry needs to be cancellable so the user can get on and use
the device for something else right away.  This is the behaviour of my
P800 phone, for instance, so I'm guessing it's not technically
impossible.

-- Edd




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>