Android 无法检测到 iOS 背景 BLE 广告

标签 ios bluetooth-lowenergy core-bluetooth android-bluetooth ios-bluetooth

当一个 iOS BLE 外围设备进入后台状态时,广告数据包不会以常规方式发出,它们被放置在一个特殊的“溢出”区域,只有另一个 iOS 设备明确寻找该设备才能检测到该区域。

The bluetooth-peripheral Background Execution Mode

That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while in the background:

• The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised.

• All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.


Android 中心(扫描仪)有什么方法可以检测任何广告的自定义 UUID,而无需连接到 iOS 外围设备?

最佳答案

对于“溢出”区域,我猜他们的意思是扫描响应数据。要获取该数据,设备必须执行主动扫描,而不是被动扫描。在主动扫描中,扫描器在检测到广告数据包后立即发送扫描请求数据包。广告设备只有在检测到扫描请求时才会广播扫描响应数据。
Android 设备只执行主动扫描,所以你应该没问题。
编辑:上面的答案不正确。见 http://www.davidgyoungtech.com/2020/05/07/hacking-the-overflow-area以获得正确的信息。

关于Android 无法检测到 iOS 背景 BLE 广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58864679/

相关文章:

ios - didDiscoverPeripheral "fail to build"错误

ios - “pod install”卡在 'Receiving Objects'

objective-c - [AVAssetWriterInput requestMediaDataWhenReadyOnQueue :usingBlock:] 的内存问题

ios - 或者在 whereField 中从 Firestore 中获取文档

ios - 无法定期在 IOS 中进行后台 API 调用以推送应用程序从 BLE 设备接收到的数据

objective-c - CBPeripheral 名称有时为空

ios - 适用于 iOS 的 Google Analytics,未在 Google 端接收数据

c# - FromBluetoothAddressAsync 永远不会在 WPF 应用程序中的 Windows 10 Creators Update 上返回

android - 如何在 Android 中实例化 L2Cap 套接字?

iphone - iOS 7 的 CBCentralManager 更改