如何使用蓝牙经典而不是乐 [英] How to use bluetooth classic instead of le

查看:11
本文介绍了如何使用蓝牙经典而不是乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考 Dennis Mathews 的回答,您如何在 iOS 上指定蓝牙经典而不是 LE?是否有与 核心蓝牙框架不同的 API?

解决方案

Joels 有一种非常清晰的方法可以在 iOS 上使用经典蓝牙.它带有外部附件框架(除了经典蓝牙之外,它还包括直接硬件连接).

您需要添加 ExternalAccessory.framework 并在 plist 内所需的后台模式中指定App 与附件通信"才能开始.但需要注意的是,对于经典蓝牙,用户必须从系统蓝牙设置中添加您的蓝牙设备.只有使用蓝牙 LE,我们才能从应用端添加设备.

查看关于外部附件框架的文档>

针对您关于 MFi 计划的问题,应澄清:

<块引用>

我想开发一个与 MFi 配件通信的 iOS 应用程序.我需要加入 MFi 计划吗?不需要.iOS 应用程序开发人员不需要加入 MFi 计划.应用程序开发人员需要的一切都在外部附件框架中,这是在 iOS SDK 中提供的.访问iOS SDK,请加入iOS 开发者计划:https://developer.apple.com/programs/ios/.

如果您想了解更多信息,请参阅 MFi 常见问题

In reference to Dennis Mathews answer how do you specify bluetooth classic instead of LE on iOS? Is there a different api from Core Bluetooth Framework?

解决方案

Joels there is a very clear way to use Bluetooth classic on iOS. It is with the External Accessory framework (it also includes direct hardware connections in addition to Bluetooth classic however).

You need to add the ExternalAccessory.framework and specify "App communicates with an accessory" in the required background modes inside your plist to get started. It should be noted however that with Bluetooth classic, the user must add your Bluetooth device from the System Bluetooth settings. It is only with Bluetooth LE that we are able to add devices from the app side.

Check out the docs on the External Accessory Framework

In response to your question regarding the MFi program, this should clarify:

I want to develop an iOS app that communicates with an MFi accessory. Do I need to join the MFi Program? No. iOS app developers do not need to join the MFi Program. Everything app developers need is in the External Accessory Framework, which is provided in the iOS SDK. To access the iOS SDK, please join the iOS Developer Program: https://developer.apple.com/programs/ios/.

If you'd like to learn more, consult the MFi FAQ

这篇关于如何使用蓝牙经典而不是乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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