Using IOBluetoothDeviceInquiry Functions, waiting for result
Using IOBluetoothDeviceInquiry Functions, waiting for result
- Subject: Using IOBluetoothDeviceInquiry Functions, waiting for result
- From: "Martin Elich" <email@hidden>
- Date: Fri, 1 Dec 2006 11:50:17 +0100
Hi Members,
I want to develop some command line based bluetooth applications using
C and IOBluetooth.framework. I want to use functions from
IOBluetoothUtilities.h, I succeeded at using functions, which return
value directly after calling, but I can't get to work for example
IOBluetoothDeviceInquiryGetFoundDevices(..), which I think is running
in different thread for several seconds. I tried using
CFRunLoopRuInMode and registring callback for
IOBluetoothDeviceInquiryGetFoundDevices(..) but it is never called
during the loop.
What should be used instead CFRunLoop? or where is the mistake? Can
someone help?
Thanks for answers.
void callback2(void *userRefCon,IOBluetoothDeviceInquiryRef
inquiryRef, IOBluetoothDeviceRef deviceRef)
{
printf("callback\n");
}
....
IOBluetoothDeviceInquiryRef inInquiry;
inInquiry = IOBluetoothDeviceInquiryCreateWithCallbackRefCon(NULL);
IOBluetoothDeviceInquirySetDeviceFoundCallback(inInquiry, callback2);
IOBluetoothDeviceInquiryGetFoundDevices(inInquiry);
CFRunLoopRunInMode(kCFRunLoopDefaultMode,50,true);
....
_______________________________________________
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