要在前景/背景中从其他BLE设备扫描的背景广告外围设备

问题描述 投票:-1回答:1

我正在处理BLEiOS,在其中我可以建立外围广告并同时进行扫描。

我有两个设备,两个设备都将同时扫描广告,当这些设备位于前台时,它可以正常工作。

现在的问题是:设备处于后台状态,这意味着广告无效(无法显示本地名称和UUID,因为它将按照Apple的要求进行屏蔽),因为按照Apple Docs:advertisement key are placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.

现在我的问题是如何扫描此溢出区域?

[另外请注意,当某设备在后台做广告时,我也无法在以下代表处回电:- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *, id> *)advertisementData RSSI:(NSNumber *)RSSI;

我可以采用这种方法的任何可能的方法,这真的很有帮助。

ios swift bluetooth-lowenergy
1个回答
0
投票

上述情况的解决方案如@ Paulw11所述。我们只需要扫描特定的外围设备ID。谢谢Paulw11

© www.soinside.com 2019 - 2024. All rights reserved.