我们可以在iOS上检测到非iBeacon信标吗? [英] Can we detect non-iBeacon beacons on iOS?

查看:67
本文介绍了我们可以在iOS上检测到非iBeacon信标吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的团队正在研究一个信标,我们需要与用户iPhone上的应用进行对话.由于我们需要该应用程序检测信标并执行代码以与我们的API进行通信(即使被杀死),因此我们无法使用CoreBluetooth,而需要作为信标进行操作.

I and my team are working on a beacon that we need to talk to an app on the user's iPhone. Since we need the app to detect the beacon and execute code to talk to our API even when killed, we cannot use CoreBluetooth and need to operate as a beacon.

我们正在尝试在BCM20737S BLE模块上创建自定义信标.是否可以将此自定义信标作为信标与iPhone上的应用进行通话? (CoreLocation框架)

We're attempting to make a custom beacon on a BCM20737S BLE module. Is it possible to have this custom beacon talk to an app on an iPhone as a beacon? (CoreLocation framework)

谢谢!

推荐答案

只要您的数据包正在使用iBeacon协议广播数据包,则corelocation可以检测到该数据包,并且您的应用程序将基于对该信号的检测而唤醒. iBeacon协议数据包是一个25字节的有效负载,被设置为BLE广告中的制造商数据字段.

As long as your packet is broadcasting a packet with the iBeacon protocol, then corelocation can detect it and your app will wake based on detection of this signal. An iBeacon protocol packet is a 25 byte payload set as the manufacturer data field in the BLE advertisement.

  1. 公司ID为2个字节(0x004C)
  2. 类型为1个字节(0x02)
  3. 数据长度为1个字节(0x015)
  4. 邻近性UUID是一个16字节的十六进制字符串
  5. 主要是2个字节uint16_t
  6. 次要是2个字节uint16_t
  7. 测量功率为1字节int8_t

此堆栈线程可能对您有用.

This stack thread might be of some use to you.

什么是iBeacon蓝牙配置文件

但是,基本上corelocation仅针对ibeacons配置,如果您要传输其他协议数据包,则需要在iOS上使用CoreBluetooth,那么一旦收到该数据包,请以某种方式对其进行转换以用于您的应用程序.

But essentially corelocation is only configured for ibeacons, if you want to transmit a different protocol packet youre going to need to use CoreBluetooth on iOS, then once you receive the packet, translate it somehow for use with your app.

这篇关于我们可以在iOS上检测到非iBeacon信标吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆