CoreBluetooth从未在iPhone5S上调用didDiscoverServices [英] CoreBluetooth never calls didDiscoverServices on iPhone5S

查看:80
本文介绍了CoreBluetooth从未在iPhone5S上调用didDiscoverServices的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大多数情况下,我们正在编码的应用程序与BLE外围设备配合得很好.通常,对于iPhone 5S用户,设备会陷入混乱,每当我们扫描服务时,都不会调用didDiscoverServices:委托方法.重新启动设备或删除所有设置(常规->重置->重置所有设置)可以暂时解决此问题.

Most of the time, the app we are coding works quite well with our BLE peripheral. Often for iPhone 5S users the device gets in a funk and whenever we scan for services, the didDiscoverServices: delegate method is never called. Rebooting the device or deleting all settings (General -> Reset -> Reset all settings) fixes the problem temporarily.

一旦设备出现此问题,甚至 other 个应用程序(例如LightBlue)也会受到影响;在重启之前,所有外围设备都无法发现服务.

Once the device exhibits this problem, even other apps (eg. LightBlue) are affected; no peripherals are able to discover services until a reboot.

对于上下文,我们的BLE外设当前不支持配对.

For context, our BLE peripheral does not currently support pairing.

是什么导致此问题?有什么方法可以避免引起不稳定?一旦发生,有没有一种方法可以让应用程序自动从中恢复?

What is causing this problem? Are there any ways to avoid causing the instability? Once it happens, is there a way that the app can recover from it automatically?

一些具有类似症状的问题: App不能运行t重新连接时发现服务不扫描服务在iPad Air中

Some issues with similar symptoms: App doesn't Discover Services When Reconnecting and Not Scanning for Services in iPad Air

更新:仅供参考,我仍在解决这个问题,但是某事我们确实使它发生的次数减少了(因此,它并不是真正的优先ATM).我不知道是什么原因导致了增加的稳定性.

Update: Just FYI, I'm still working on this problem, but something we did caused it to happen way less (therefore it's not really a priority ATM). I don't know what caused the added stability yet.

推荐答案

这可能是一个iOS错误

It's probably an iOS bug

1)在设备上启用蓝牙登录 https://developer.apple.com/bug-reporting/ios/bluetooth/

1) Enable bluetooth logging on your device https://developer.apple.com/bug-reporting/ios/bluetooth/

2)使用数据包嗅探器观察iOS和BLE外设之间的连接

2) Use a packet sniffer to observe the connection between iOS and BLE peripheral

这篇关于CoreBluetooth从未在iPhone5S上调用didDiscoverServices的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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