Device discovery using C/C++
Device discovery using C/C++
- Subject: Device discovery using C/C++
- From: email@hidden
- Date: Wed, 04 Jul 2007 22:55:39 +0200
Hi,
I would like to use IOBluetooth framework in C++ console application. Currently
I am using device discovery like this:
IOBluetoothDeviceInquiryRef inquiry =
IOBluetoothDeviceInquiryCreateWithCallbackRefCon(NULL);
IOBluetoothDeviceInquirySetDeviceFoundCallback(inquiry, &DeviceFoundCallback);
IOBluetoothDeviceInquirySetCompleteCallback(inquiry, &CompleteCallback);
IOBluetoothDeviceInquirySetUpdateNewDeviceNames(inquiry, FALSE);
IOBluetoothDeviceInquiryStart(inquiry);
for (i = 0; i < 10; i++)
{
sleep(1);
}
IOBluetoothDeviceInquiryStop(inquiry);
IOBluetoothDeviceInquiryDelete(inquiry);
The problem is that the callbacks are not called unless i invoke
IOBluetoothDeviceInquiryStop() first, meaning I am aborting the inquiry. I have
changed the sleep interval or the inquiry interval, but nothing works.
Do I have to call any other function to process BT inquiry and call appropriate
callbacks?
Also, where could I find C/C++ sample code for IOBluetooth? Everything is meant
only for Objective C programmers. :( Currently I am learning BT stuff only
from framework's header files, which takes time. BTW, I am not going to switch
to Objective C, I absolutely hate its syntax (the mix of C++ and LISP).
Best regrads
___________________________________________________________________________
Najhitrejši brezplačni klicni dostop :: Varno in zanesljivo po internetu
Obiščite http://www.dialup386.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