【发布时间】:2019-06-09 15:11:23
【问题描述】:
我的问题是 iOS 和各种 android 手机从特定的 ibeacon 接收到 BLE 广告数据包的数量,例如在 5 分钟内从特定的信标 iOS 接收到大约 904 个广告数据包,而 android 手机接收到大约 230 到 480 之间,具体取决于手机.
有没有人知道有没有设置可以设置BLE模块的扫描率?如果不是,还有什么可能导致此问题?
我在 iOS 中使用“CBCentralManager”来利用 BLE 模块,在 Android 中使用“blutoothLeScanner”。
//Creating an instance of CBCentralManager
private let bluetoothManager = CBCentralManager(delegate: nil, queue: nil)
//Start Scanning
bluetoothManager.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey:NSNumber(value: true)])
【问题讨论】:
-
您的计数是基于在前台还是后台运行的应用程序?
-
我的应用在前台运行。
-
你能在iOS上显示你的扫描码吗?根据我的经验,iOS 上的检测应该不会比 Android 少得多,所以我怀疑你的设置中的某些东西正在影响 iOS。
-
我已经编辑了问题并添加了代码。
-
对不起,我误读了这个问题。我现在看到您在 iOS 上检测到 更多 个广告而不是 Android,这并不让我感到惊讶。
标签: android ios bluetooth-lowenergy ibeacon rssi