• 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
CoreBluetooth dealing with Included Services
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreBluetooth dealing with Included Services


  • Subject: CoreBluetooth dealing with Included Services
  • From: "m.kroll" <email@hidden>
  • Date: Thu, 03 Jul 2014 00:09:15 +0200

Hello developers,
has anyone tried to discover included services of a service yet?

I'm talking about

[peripheral discoverIncludedServices:nil forService:service];

On iOS 7.1.2 it simply crashes if the included Service is a 16 byte UUID service. If the included Service is a 2 byte UUID service and the included characteristics are 2 byte ones, everything is fine and
the delegate

- (void)peripheral:(CBPeripheral *)peripheral didDiscoverIncludedServicesForService:(CBService *)service error:(NSError *)error

is called successfully. If the Included Service UUID is a 16 byte one, the app crashes between dicoverIncludedServices and the delegate call didDiscoverIncludedServicesForService showing somithing like this in the log:


*** Assertion failure in -[CBUUID initWithData:], /SourceCache/CoreBluetooth/CoreBluetooth-109/CBUUID.m:199
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data <30ced314 00000000 00000000 00000000 13d2e876 2067d414 00000000 803de314 141e8700> does not represent a valid UUID'
*** First throw call stack:
(0x2dbe2f83 0x3845dccf 0x2dbe2e5d 0x2e590d5b 0x2d90b4e1 0x2d90b6cd 0x2d90a067 0x2d90a597 0x2d909b99 0x2d909c7b 0x2d909d61 0x2d905fab 0x2d90e64b 0x38945833 0x3894581f 0x3894c49f 0x2dbad8a1 0x2dbac175 0x2db16ebf 0x2db16ca3 0x32a70663 0x3046314d 0x90a85 0x3896aab7)
libc++abi.dylib: terminating with uncaught exception of type NSException


My Gatt sample looks like this:

Service 832C3299-2AE2-4C91-A25C-49E7FE5247F6
|
+-- Service EF1716A9-DD1D-477B-8355-83793D8C92EA
|     |
|     +-- Characteristic 832C3299-2AE2-4C91-A25C-49E7FE5247F6
|
+-- Characteristic 677C006F-8FE1-4477-B2F6-D16CB2336678

Any hints? This looks like a bug in CoreBluetooth. Can anybody confirm this?

Regards,
Michael.
--
# Dr. Michael Kroll
#
# Blog: http://mkroll.mobi
# Forum: http://forum.mkroll.mobi
# Twitter: @dr_m_kroll







 _______________________________________________
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

  • Next by Date: Retrieving peripherals
  • Next by thread: Retrieving peripherals
  • Index(es):
    • Date
    • Thread