Re: Callback for Inquiry
Re: Callback for Inquiry
- Subject: Re: Callback for Inquiry
- From: Geoffrey Schmit <email@hidden>
- Date: Wed, 11 Oct 2006 22:33:33 -0500
On 11/10/2006 at 3:54 PM, Christian Martin
<email@hidden> wrote:
Currently working on library which will provide bluetooth
services. I do not want the UI provided. When I try to set a
search devices, I do the following calls:
....
m_network =
IOBluetoothDeviceInquiryCreateWithCallbackRefCon(/*void
*inUserRefCon*/ this );
/ Register call back fctns
ret = IOBluetoothDeviceInquirySetCompleteCallback(m_network, OnDeviceDiscoveryCompleted);
ret = IOBluetoothDeviceInquirySetDeviceFoundCallback(m_network, OnDeviceDiscovered );
OBluetoothDeviceInquirySetSearchCriteria(m_network, kBluetoothServiceClassMajorAny,
kBluetoothDeviceClassMajorAny,
kBluetoothDeviceClassMinorAny);
IOBluetoothDeviceInquiryStart(m_network);
....
This triggers the searching of devices but the callback
function are not callback ? Any possible explanation ? These
callbacks are called in a separate thread right ?
If these functions behave like other Bluetooth callbacks, they
are dispatched in the context of the main run loop. In order
for the callbacks to work, they must be registered in the same
thread that is running the main run loop. Perhaps the thread in
which these callbacks are registered is not the thread that
created the main run loop. Or, perhaps, the main run loop is
not running.
I haven't used the above functions, so the above is just based
on my experience with other aspects of the Bluetooth framework.
geoff
--
Geoff Schmit
Sugar Maple Software, Inc.
<http://sugarmaplesoftware.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden