IOBluetoothDeviceSelectorController and IOBluetoothDeviceSearchAttributes...
IOBluetoothDeviceSelectorController and IOBluetoothDeviceSearchAttributes...
- Subject: IOBluetoothDeviceSelectorController and IOBluetoothDeviceSearchAttributes...
- From: Aurélien Hugelé <email@hidden>
- Date: Tue, 13 Jul 2004 11:21:14 +0200
hi !
Apple's BT team is really helpful (as i experienced myself 2 weeks ago
is SF ;-) ) so i have another question for them (or any other list
member !)
i would like my BT device selector to filter only phone/telephony
devices.
i've read the doc (and the headers this time !) and found that i should
use something like :
deviceSelector = [[IOBluetoothDeviceSelectorController alloc] init];
[deviceSelector setSearchAttributes:<#(const
IOBluetoothDeviceSearchAttributes *)searchAttributes#>];
[deviceSelector runModal];
// test the return of runModal
[deviceSelector getResults];
The problem for me is the searchAttributes structure... i'm not really
familiar with low level stuff and must admit i'm lost...
struct IOBluetoothDeviceSearchAttributes
{
IOBluetoothDeviceSearchOptions options; // Options.
IOItemCount maxResults; // Maximum number of results you
desire. 0 means infinite.
IOItemCount deviceAttributeCount;
IOBluetoothDeviceSearchDeviceAttributes *attributeList;
};
I don't really care of the options, maxResults. Only the attributeList
is important :
struct IOBluetoothDeviceSearchDeviceAttributes
{
BluetoothDeviceAddress address; // 00 08 22 44 AB 56, etc.
BluetoothDeviceName name; // "Al Yankovic's Phone", etc.
BluetoothServiceClassMajor serviceClassMajor; // Networking,
Rendering, etc.
BluetoothDeviceClassMajor deviceClassMajor; // Computer, Phone,
Audio, etc.
BluetoothDeviceClassMinor deviceClassMinor; // Desktop, cordless,
headset, etc.
};
with my current testing, i only need to set the deviceClassMajor and
deviceClassClassMinor to specific values to discover BT enabled
cellular phones (the serviceClassMajor seems to differ with each
brand...)
can i create my IOBluetoothDeviceSearchAttributes with NULL for each
members of the structure (except attributeList of course) ? or 0 ? (the
headers comments are not really clear on this point)
how to create my IOBluetoothDeviceSearchDeviceAttributes struct ??
any address, any name, how to get that ? i don't see any
kBluetoothServiceAddressAny, kBluetoothServiceNameAny ...
any serviceClassMajor (kBluetoothServiceClassMajorAny) would be ok, i
just need specific deviceClassMajor/Minor...
can you help me ?
thanks for all your help !
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.