【问题标题】:CentralManager State Resetting - what causes this and how can i prevent it?CentralManager 状态重置 - 是什么原因造成的,我该如何预防?
【发布时间】:2016-04-27 13:25:07
【问题描述】:

我的 centralManger 对象有问题,它工作得很好,我可以连接和断开外围设备。一旦我配对了 2 个外围设备,半小时后(或多或少......),centralManger 状态变为“CentralManagerStateResetting”,这会导致我的外围设备自动断开连接并且不调用委托:didDisconnectPeripheral。

这是来自苹果的文档: @constant CBCentralManagerStateResetting 与系统服务的连接暂时丢失,即将更新。

  1. 这个状态是什么意思?
  2. 为什么 centralManger 会进入这个状态?
  3. 如何防止它进入这种状态?
  4. 我该如何解决这个问题?

在所有 iPhone 中都可以看到并在 iOS 9+ 版本中检查

【问题讨论】:

    标签: ios core-bluetooth cbcentralmanager


    【解决方案1】:

    这很可能意味着BTServer 崩溃了。通常它会在几秒钟内恢复并且状态应该再次变为CBCentralManagerStatePoweredOn

    检查您的设备日志以获取来自BTServer 的输出。

    如果 BLE 堆栈上有大量负载并且系统必须同时管理与不同外围设备的大量连接,则可能会发生这种情况。

    【讨论】:

      猜你喜欢
      • 2012-08-20
      • 2015-01-07
      • 1970-01-01
      • 2021-07-04
      • 1970-01-01
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 2015-05-25
      相关资源
      最近更新 更多