• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IOBluetoothAddServiceDict invocation leads to crash of blued
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOBluetoothAddServiceDict invocation leads to crash of blued


  • Subject: Re: IOBluetoothAddServiceDict invocation leads to crash of blued
  • From: Craig Dooley <email@hidden>
  • Date: Wed, 21 Jul 2010 10:16:50 -0700

A radar is always the better way to make sure bugs don't get lost.  Please file one for the Boolean parsing being wrong, and the crash in blued.

As for putting binary data into a string SDP element, this is kind of overloaded to make SDP records look like plists.  In order to force the data to not be parsed by CF/NSString, use a dictionary of the form

Item (dictionary)
	DataElementType 	(number) : 	4 (SDP string type)
	DataElementSize 	(number) : 	length of data
	DataElementValue 	(data): 		raw data

IOBluetoothAddServiceDict is currently the only way to register a service, but we are looking to deprecate the older C API, which means making Objective-C alternatives available wherever needed.  If you have any suggestions, please file enhancement requests.

- Craig

On Jul 21, 2010, at 6:29 AM, Matthias Ringwald wrote:

> Hi
>
> I did more tests with dictionaries and found out that IOBluetoothAddServiceDict fails to handle BOOL data elements.
>
> If I specify an attribute like this:
>
> Item (dictionary)
>  DataElementType (integer): 5
>  DataElementSize (integer) : 1
>  DataElementValue (integer): 1
>
> the service record received by a remote device lacks the value byte, and gets the header of the next data element as the value of the BOOL entry.  It did not crash for me but this clearly is a bug.  Can someone from the Apple devs please have a look at this? (I guess posting here is more efficient than filling out a rdar - google could find this mail).
>
> Also, does anybody know if are there other methods/functions, maybe private ones, that add a service that contains BOOL attribute value?
>
> Best
> Matthias
>
> Am Jul 17, 2010 um 4:05 PM schrieb Thomas Tempelmann:
>
>> Back in 2007, I had tried to create a HID bluetooth service on a OS X
>> (Tiger) system. That failed, due to bugs in OS X (rdar:5094971).
>>
>> Later, when I had long given up on this project, I received note that
>> this issue had been resolved in 10.5. I received no details on how
>> this was resolved, though.
>>
>> Now I finally tried again, and this time, it's gotten worse: While on
>> Tiger I simply noticed wrong SDP entries for my registered service,
>> now the same code crashes blued, apparently.
>>
>> All I do is to invoke IOBluetoothAddServiceDict just as it's
>> documented in Apple's BT docs under "Adding a Service Definition to
>> the SDP Database". I've been trying with two different HID plists, one
>> for a simple "3 button boot mouse" and one with what Apple's own
>> original Bluetooth uses. Neither the crashlog nor the syslog are
>> giving any helpful indication what's going wrong.
>>
>> I'm trying this on 10.6.4.
>>
>> Does anyone know more on this?
>>
>> Has anyone ever successfully registered a HID service on OS X?
>>
>> And is there perhaps a ObjC alternative to this C function? I could
>> not find one.
>>
>> --
>> Thomas Tempelmann, http://www.tempel.org/
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: IOBluetoothAddServiceDict invocation leads to crash of blued
      • From: Matthias Ringwald <email@hidden>
References: 
 >IOBluetoothAddServiceDict invocation leads to crash of blued (From: Thomas Tempelmann <email@hidden>)
 >Re: IOBluetoothAddServiceDict invocation leads to crash of blued (From: Matthias Ringwald <email@hidden>)

  • Prev by Date: Re: IOBluetoothAddServiceDict invocation leads to crash of blued
  • Next by Date: Re: IOBluetoothAddServiceDict invocation leads to crash of blued
  • Previous by thread: Re: IOBluetoothAddServiceDict invocation leads to crash of blued
  • Next by thread: Re: IOBluetoothAddServiceDict invocation leads to crash of blued
  • Index(es):
    • Date
    • Thread