Re: Public API for Bluetooth Inquiry (follow-up)
Re: Public API for Bluetooth Inquiry (follow-up)
- Subject: Re: Public API for Bluetooth Inquiry (follow-up)
- From: Paul Davis <email@hidden>
- Date: Wed, 20 Nov 2002 00:24:26 -0500
On 11/18/02 8:15 PM, "Eric Brown" <email@hidden> wrote:
>
>
On Sunday, November 17, 2002, at 03:33 PM, Paul Davis wrote:
>
>
> Eric,
>
>
>
> I put some time into this and would like your opinion on my
>
> conclusions:
>
>
>
> 1. I looked into using the IOBluetoothPairingController class as a
>
> means for
>
> obtaining the device name. The runPanelWithAttributes works fine
>
> however it
>
> returns nothing. Therefore, it's not very useful.
>
>
>
>
That would be a problem, wouldn't it. It will be fixed in the next dev
>
release.
>
I wouldn't worry about this. See my response below on 2.
>
> 2. Next I used IOBluetoothDeviceSelector class. The
>
> runPanelWithAttributes
>
> returns a pointer to an IOBluetoothDevice with all the salient
>
> information
>
> pertaining to the selected device from the GUI. This is extremely
>
> useful.
>
> I'm having some trouble extracting the details of the Service Record
>
> but I
>
> won't burden you with questions until I have spent more time on this.
>
>
>
>
Let us know how it turns out. There should be API to do everything you
>
need.
>
I was able to get everything I need using the IOBluetoothDeviceSelector
class. I was able to select the remote device and extract all details of the
SDP records. I use the runPanelWithAttributes method. One question. Can you
verify if this methods performs an inquiry? It appears to since the
LastUpdate times always change but I would like to know for sure.
>
> 3. After thinking more about this, the API Apple is working on that
>
> will
>
> give access to the list of paired devices would be useful. Probably a
>
> better
>
> method in lieu of public inquiry API.
>
>
>
>
That sounds good - especially if you require the device to be paired to
>
use.
>
I am now convinced this is the way to go for my application as long based on
the results of 2. One question: Are the paired devices stored in a plist
that I could read? If the answer is yes, I should be able to parse with XML
services and we may not need the paired devices API.
>
> 4. I can't get the getRFCOMMChannelID method in the
>
> IOBluetoothSDPServiceRecord class method to work. It always bombs and
>
> was
>
> hoping you could comment. Are there are issues with this method?
>
>
>
>
Is the app crashing or is it throwing an uncaught objc exception? The
>
code does have a couple of holes in the case where the
>
ProtocolDescriptorList attribute is improperly formatted. It checks
>
the first UUID in each sequence in the ProtocolDescriptorList for the
>
RFCOMM UUID. Then it assumes that the sequence has a second element
>
and attempts to get the RFCOMM channel ID from it. So if one of the
>
sequences has no elements or if the first element is the RFCOMM UUID
>
and there is no second element, it will cause an exception to be
>
thrown. That's a bug and we'll fix it. But it should work properly if
>
the ProtocolDescriptorList is formatted correctly.
>
>
- Eric
>
Well this turned out to be my fault. Sorry for the erroneous information.
Thanks for the heads up about the exception. I'll make sure to cover
appropriately (throw/catch) later in the project.
One other question. Any idea when your stack will support the HID profile?
Even if you can tell me yes/no for 2003 this would be helpful.
_______________________________________________
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.