gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 15:18:44 24 4
gpt4 key购买 nike

当一个 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com