【问题标题】:Is there other solution instead of iBeacon for iOS?是否有其他解决方案代替 iOS 的 iBeacon?
【发布时间】:2014-03-22 16:45:30
【问题描述】:

我知道苹果发布了基于蓝牙4.0协议的iBeacon。

在任何蓝牙设备中,如果我们使用以下代码对设备进行编码:

  0x4c,
  0x00,
  0x02,
  0x15,

表示此蓝牙设备是iBeacon蓝牙设备。

static uint8 advertData1[] = 
{ 
  // 25 byte ibeacon advertising data
  // Preamble: 0x4c000215
  // UUID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0
  // Major: 1 (0x0001)
  // Minor: 1 (0x0001)
  // Measured Power: -59 (0xc5)
  0x1A, // length of this data including the data type byte
  GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific advertisement data type
  0x4c,
  0x00,
  0x02,
  0x15,
  0xe2,
  0xc5,
  0x6d,
  0xb5,
  0xdf,
  0xfb,
  0x48,
  0xd2,
  0xb0,
  0x60,
  0xd0,
  0xf5,
  0xa7,
  0x10,
  0x96,
  0xe0,
  0x00,
  0x00,
  0x00,
  0x07,
  0xc5
};

我的问题是如果我定义我自己的协议,这意味着我改变了这个

  0x4c,
  0x00,
  0x02,
  0x15,

是否有可能我可以通过 iphone 识别我自己定义的蓝牙设备,而无需在 iphone 上添加额外的识别设备。

苹果支持定制的ibeacon吗?

编辑 根据davidgyoung所说,我对stackoverflow进行了一些研究,以与ibeacon问题分享

  1. iOS CoreBluetooth / iBeacon: Advertise an iBeacon and a peripheral service concurrently cmets 很有帮助

  2. Using CoreBluetooth with iBeacons

  3. iOS 7 Tutorial Series: Core Location Beacons

  4. Using CoreBluetooth with iBeacons

  5. iBeacon Monitoring in the Background and Foreground

【问题讨论】:

    标签: iphone ios7 bluetooth bluetooth-lowenergy ibeacon


    【解决方案1】:

    是的,您当然可以在 iOS 上定义自己的自定义蓝牙 LE 广告并将其用作信标。

    但您将无法使用 CoreLocation API 来检测这些非标准 iBeacon。您必须使用 CoreBluetooth API,这将对权限和后台使用施加限制。

    【讨论】:

    • thnx,@davidgyoung;你说:1.如果使用CoreLocation,它可以进入后台检测ibeacon设备,如果是,你能告诉我怎么做吗? ; 2. 你能否更具体地了解 CoreBluetooth API 对权限的限制
    • 这里是对后台 iBeacon 行为的详细解释:developer.radiusnetworks.com/2013/11/13/…。就权限而言,如果您使用 CoreLocation,iOS 会要求使用您当前的用户位置。如果您使用 CoreBluetooth,则不会。
    • 非常感谢,@davidgyoung
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-16
    • 1970-01-01
    • 2015-10-25
    相关资源
    最近更新 更多