Core Bluetooth doesn't find peripherals when scanning for specific CBUUID

孤者浪人 提交于 2019-12-04 04:26:13

CoreBluetooth can be very frustrating. Here are a couple things to try:

#1: A peripheral that has been connected to stops advertising. If you make a successful connection to the peripheral, you'll need to restart advertising.

#2: iOS caches discovered status and provided services. There's no programmatic way to refresh / clear the cache. Try disabling BT on the iOS device and on the Mac and re-enabling it. Then attempt another connection.

#3: There's a problem with your UUIDs. Try scanning for peripherals with the UUID parameter set to nil. You should then discover all peripherals in range.

#4: The BT connection on a Mac can be finicky if the Wifi is on. Try disabling Wifi on your Mac and try again. I've found BTLE completely unusable with Wifi enabled so I've had to use ethernet when doing any BTLE dev on my MacBook.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!