本文介绍了从iOS App列出(并连接到)蓝牙设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过蓝牙广播数据的设备。它是MFI认证的,我已经在AppStore上有一个使用外部附件框架与之通信的应用程序。

I have a device that broadcasts data via bluetooth. It is MFI certified and I already have an application on the AppStore that communicates with it, using the External Accessory Framework.

问题是我的应用程序认为设备已经是配对。

The problem is that my application assumes the device is already paired.

有没有办法枚举触手可及的所有此类设备,并允许用户选择(并因此配对)列表中的某个设备?

Is there a way to enumerate all such devices within reach and allow the user to select (and therefore pair) to one of the devices in the list?

推荐答案

不,除非首次满足两个标准,否则不能这样做。

No, you can not do this unless two criteria are first met.


  1. 您的设备必须是蓝牙低功耗设备。

  2. 设备必须配备蓝牙4.0集成芯片,目前只是iPhone 4S和新iPad。

这些设备,如果在低能耗模式下运行,可以通过 CoreBluetooth 框架。这个框架没有直接的文档形式,但如果你是一个经验丰富的iOS开发人员,你应该能够通过cut-and-dry框架文档找出如何使用框架。

These devices, if operating in the low-energy mode, can be discovered and paired through the CoreBluetooth framework. There is no walk-through form of documentation on this framework, but if you are a seasoned iOS developer, you should be able to figure out how to use the framework through the cut-and-dry framework docs.

如上所述,有关MFi计划和硬件开发的信息被Apple NDA锁定。但是,有关以这种方式与这些设备配对的信息可通过Apple自己的文档中的信息轻松获得。

As mentioned, information regarding the MFi program and hardware development is locked down under an Apple NDA. However, the information regarding pairing to these devices in this manner is readily available through information in Apple's own documentation.

这篇关于从iOS App列出(并连接到)蓝牙设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 02:30