1

I'm trying to create an iBeacon with CBPeripheralManager (so it can run in the background).

Tried to discover the CBService and CBCharacteristics of both Estimotes beacons and an iPad acting as an iBeacon (CBBeacon) but with little luck so far.

I wonder if someone has already done this or faced such a scenario. I would really appreciate it a lot If someone has already discovered CBPeripheral - CBService - CBCharacteristic structure.

Thanks a lot in advance!

Darren
  • 138
  • 1
  • 8
  • http://www.appcoda.com/ios7-programming-ibeacons-tutorial/ – Midhun MP Mar 20 '14 at 17:31
  • @MidhunMP That tutorial use CBBeaconRegion, I'm trying to build an iBeacon by defining the proper CBService and CBCharacteristics of it. thanks! – Williams_Martinez Mar 20 '14 at 18:25
  • Advertising from the background is believed not to be possible at present (unless you modify the operating system/security model of the device). The "iBeacon" scheme consists of a simple advertising packet, and does not formally involve any services or characteristics, so there is likely nothing for you to discover. – Chris Stratton Mar 20 '14 at 19:28
  • @ChrisStratton I wrote this little app that scan for bluetooth peripherals and reports all services and characteristics of those services as it finds it. For the Estimotes beacons I see 4 services (all with UUID B9407F30-F5F8-466E-AFF9-25556B57FE6D). For the iPad or iPhone acting as iBeacon I see 2 services "180f" and "1805". With this I thought I could "define" a service "like" iBeacons but only using CBMutableServices and CBMutableCharacteristic – Williams_Martinez Mar 20 '14 at 19:50
  • Those are vendor-specific additional capabilities; they have nothing to do with "iBeacon" which does not itself involve services or characteristics, only advertising packets. iOS does not presently allow you to advertise from the background. – Chris Stratton Mar 20 '14 at 19:51

2 Answers2

1

The iBeacon profile is different to the GATT profile that is supported by CoreBluetooth, so you cannot build an iBeacon advertisement using CoreBluetooth.

For information on the iBeacon profile refer to this answer - What is the iBeacon Bluetooth Profile

Community
  • 1
  • 1
Paulw11
  • 108,386
  • 14
  • 159
  • 186
1

I've actually tried this (using a custom iBeacon advertisement data based on this article), but sad to say it didn't work. I've come to the conclusion that iOS seems to somehow know what an iBeacon advertisement looks like even when not using a CLBeaconRegion object and it won't allow it to run in the background even as a peripheral using Core Bluetooth.

EDIT:

To add more regarding your attempt to discover Services and Characteristics on your Estimote, perhaps have a look at this answer. Long story short, if you use an app like LightBlue to discover the services on an Estimote, the ServiceUUID and the ProximityUUID are completely different. Estimote seems to use GATT for Connectivity Mode and iBeacons for Advertising mode. You can read more about Estimote's different modes here.

Community
  • 1
  • 1
Yazid
  • 970
  • 7
  • 14
  • @Williams_Martinez Have a look at my edit to give you more information about what you're trying to do with Estimote's services. Hope that helps! – Yazid May 06 '14 at 23:36