从 iOS 连接到蓝牙设备,没有 MFi
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11955278/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Connecting to a Bluetooth device from iOS, no MFi
提问by Aaron
The vibe I'm getting from Stackoverflow and the internet at large is that unless I'm using an LE device, any Bluetooth device I make for an iOS app must be MFi certified.
我从 Stackoverflow 和整个互联网获得的感觉是,除非我使用的是 LE 设备,否则我为 iOS 应用程序制作的任何蓝牙设备都必须经过 MFi 认证。
However, on the MFi FAQpage, I found this line:
但是,在MFi 常见问题解答页面上,我发现了这一行:
...developers of accessories that rely solely on standard technology (e.g., Bluetooth Low Energy or standard Bluetooth profiles) do not need to join the MFi Program.
...仅依赖标准技术(例如,蓝牙低功耗或标准蓝牙配置文件)的配件开发商无需加入 MFi 计划。
My device will be able to use the standard Bluetooth profile File Transfer Protocol (FTP).
我的设备将能够使用标准的蓝牙配置文件文件传输协议 (FTP)。
Now this sounds like some conflicting advice to me, or perhaps I'm just not understanding correctly. So, having provided the above evidence, I'm just going to ask outright: Can I write and publish an iOS app that connects to a proprietary Bluetooth device using the standard Bluetooth profile FTP without certifying my device as MFi? And if so, what details, caveats, etc do I need to know?
现在这对我来说听起来像是一些相互矛盾的建议,或者我可能只是没有正确理解。因此,在提供了上述证据后,我将直接问:我可以编写和发布一个 iOS 应用程序,该应用程序使用标准蓝牙配置文件 FTP 连接到专有蓝牙设备,而无需将我的设备认证为 MFi 吗?如果是这样,我需要知道哪些细节、注意事项等?
采纳答案by TJD
That line is referring to standard profiles supported natively by ios devices, such as HFP or A2DP. If you build a headset device that does HFP, the iphone will be able to connect to it and route your call to the headset without the headset being part of MFi.
该行指的是 ios 设备本机支持的标准配置文件,例如 HFP 或 A2DP。如果您构建了一个支持 HFP 的耳机设备,iPhone 将能够连接到它并将您的呼叫路由到耳机,而耳机不会成为 MFi 的一部分。
If you want to write an app that does other things with bluetooth, inlcuding FTP, you would have to use MFi.
如果您想编写一个使用蓝牙执行其他操作(包括 FTP)的应用程序,则必须使用 MFi。
回答by Adam Davis
The new Bluetooth 4.0 Low Energy (hereafter BLE 4.0) specification which is implemented in Apple's latest iOS devices does allow one to create app-specific profiles and connect to BLE 4.0 devices without jailbreaking, using an approved Bluetooth 2.1 profile, or becoming part of Apple'd MFI program and using the previously required MFI cryptographic chips.
在 Apple 最新的 iOS 设备中实施的新蓝牙 4.0 低功耗(以下简称 BLE 4.0)规范确实允许创建特定于应用程序的配置文件并连接到 BLE 4.0 设备,而无需越狱、使用批准的蓝牙 2.1 配置文件或成为 Apple 的一部分'd MFI 程序并使用以前所需的 MFI 加密芯片。
In other words with the proper BLE 4.0 compatible bluetooth radios you can create wireless devices that connect to iOS apps without having the device pre-approved by Apple. However, you must write a custom app for the device, and Apple still holds the ability to reject that app if they want to. So they still control this to a great degree. This is essentially Apple's answer to the Android ADK, while not fully relinquishing the ability to shut down apps and devices they don't like.
换句话说,使用适当的 BLE 4.0 兼容蓝牙无线电,您可以创建连接到 iOS 应用程序的无线设备,而无需 Apple 预先批准该设备。但是,您必须为设备编写自定义应用程序,如果他们愿意,Apple 仍然可以拒绝该应用程序。所以他们仍然在很大程度上控制了这一点。这本质上是 Apple 对 Android ADK 的回答,同时并没有完全放弃关闭他们不喜欢的应用程序和设备的能力。
Your app must include specific XML schema for your app's bluetooth profile, and use CoreBluetoothFramework APIs, so it's very obvious to Apple during the app approval process that your app connects to a device. If your app does not work without the device present, then it's likely to be rejected if you are not part of the MFI program, as Apple cannot test the app without your device. The apps that appear to be successful in passing this test use the device as an accessory to app functionality, rather than a requirement. For instance an exercise app might connect to a BLE 4.0 heart rate monitor, but the app doesn't depend on it.
您的应用程序必须包含应用程序蓝牙配置文件的特定 XML 架构,并使用 CoreBluetoothFramework API,因此在应用程序批准过程中,您的应用程序连接到设备对 Apple 来说非常明显。如果您的应用程序在没有设备的情况下无法运行,那么如果您不是 MFI 计划的一部分,它可能会被拒绝,因为 Apple 无法在没有您的设备的情况下测试该应用程序。似乎成功通过此测试的应用程序将设备用作应用程序功能的附件,而不是要求。例如,锻炼应用程序可能会连接到BLE 4.0 心率监测器,但该应用程序并不依赖于它。
Some apps seem to be getting around this by displaying simulated, or online information in place of the device information when no device is present. Thus the app can be tested without the device, and functionally works when the device is present.
当没有设备时,一些应用程序似乎通过显示模拟或在线信息来代替设备信息来解决这个问题。因此,该应用程序可以在没有设备的情况下进行测试,并在设备存在时正常工作。
You can find out some successful efforts online:
您可以在网上找到一些成功的尝试:
http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/
http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreak-no-mfi/
BlueGiga in particular has been pushing their devices specifically for this use, so there are probably forums and support for this elsewhere.
特别是 BlueGiga 一直在推动他们的设备专门用于此用途,因此其他地方可能有论坛和支持。
Keep in mind that the devices that currently support BLE 4.0 are limited, and currently only include
请记住,目前支持 BLE 4.0 的设备是有限的,目前仅包括
- iPhone 4S and later iPhones
- recent MacBook Air, Mac Mini
- iPad (3rd generation and later, and iPad mini)
- Macbook Pro Retina
- iPhone 4S 和更新的 iPhone
- 最近的 MacBook Air、Mac Mini
- iPad(第 3 代及更新版本,以及 iPad mini)
- Macbook Pro 视网膜
There may be other Apple devices that support this standard, it's something Apple is advertising openly on each product's technical specifications page so it's easy to find for current products.
可能还有其他 Apple 设备支持此标准,这是 Apple 在每个产品的技术规格页面上公开宣传的内容,因此很容易找到当前产品。