Android无法检测到iOS背景BLE广告 [英] iOS Background BLE advertising not detectable by Android

查看:144
本文介绍了Android无法检测到iOS背景BLE广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当iOS BLE外围设备进入后台状态时,广告包不会以常规方式发出,而是被放置在特殊的溢出"区域中,该区域只能由明确寻找该设备的其他iOS设备检测到. >

When an iOS BLE peripheral enters the background state, the advertising packets are not emitted in the regular manner and they are placed in a special "overflow" area which is only detectable by another iOS device explicitly looking for this device.

蓝牙背景外围设备执行模式

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:

•将忽略CBAdvertisementDataLocalNameKey广告密钥,并且不广播外围设备的本地名称.

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

•CBAdvertisementDataServiceUUIDsKey广告密钥的值中包含的所有服务UUID都放置在特殊的溢出"区域中;只有通过显式扫描它们的iOS设备才能发现它们.

• 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外围设备?

Is there any way an Android central (scanner) can detect any advertised custom UUID without having to connect to the iOS peripheral?

推荐答案

在溢出"区域中,我想它们的意思是扫描响应数据".要获取该数据,设备必须执行主动扫描,而不是被动扫描.在主动扫描中,扫描程序在检测到广告包后立即发送扫描请求包.广告设备仅在检测到扫描请求时才广播扫描响应数据.

With "overflow" area I guess they mean Scan Response Data. To get that data, a device must perform an active scan, rather than a passive scan. In an active scan, the scanner sends a scan request packet immediately after it detects an advertisement packet. The advertising device will only broadcast the scan response data if it detected a scan request.

Android设备仅执行主动扫描,所以应该没事.

Android devices only perform active scans, so you should be fine.

这篇关于Android无法检测到iOS背景BLE广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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