适用于较旧 iOS 设备的蓝牙框架 [英] Bluetooth framework for older iOS devices

查看:24
本文介绍了适用于较旧 iOS 设备的蓝牙框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题与围绕 iOS 的蓝牙技术有关.我观看了 WWDC 上关于低功耗蓝牙 101、新增功能、基础知识等以及使用 iOS 5 及更高版本中可用的 CoreBluetooth 框架的内容.我浏览了不同的网站和文档,试图找到有关蓝牙 2.1 和 4 的更多信息,但数量很少.GameKIt 不是答案,我正在开发一个可以在非 iOS 设备上使用的应用程序.我经历过的一些主题:

My question is related with Bluetooth technology around iOS. I've watched WWDC about Bluetooth Low Energy 101, what's new, the basics etc, and about using the CoreBluetooth framework available in iOS 5 and later. I've looked through different sites and documentations trying to find more information about Bluetooth 2.1 and 4, but there is so few. GameKIt is not an answer, I am developing an app to work with an non-iOS device. Some of the topics I've went through:

从 iOS 连接到蓝牙设备,无 MFi

iOS - 如何在我的应用中集成蓝牙设备

http://www.bluegiga.com/files/bluegiga/Presentations/BT4_0_for_Apple.pdf

蓝牙 4.0 与旧蓝牙

iPhone 蓝牙连接到非 IOS 设备

但支持的设备只有 4S 及更高版本和最新的 iPad...

But the supported devices are just 4S and up and latests iPads...

1) 最新的 CoreBluetooth 框架会在旧设备上失败吗?

1) will the latest CoreBluetooth framework just fail on older devices?

2) 苹果是否有任何适用于 BT 2.1 之类的框架?怎么办,ipad2和iphone4的用户还这么多,我也不能无视..那到底用什么框架?

2) Did apple have any frameworks for BT 2.1 or something? What to do, there are still so many ipad2 and iphone4 users, I can't just ignore them.. So what framework actually to use?

任何帮助、建议、想法、链接将不胜感激!

Any help, advice, idea,link will be highly appreciated!

推荐答案

嗯...您需要了解一件事:CoreBluetooth 框架用于Bluetooth Low EnergyExternalAccessory 框架 用于经典"蓝牙.这实际上是我们通常所说的蓝牙(作为一个简单的用户/消费者)的两种不同的方法.只有最近的 iDevices 支持低功耗蓝牙(4S 的 iPhone、2011 年的 MacBook Air 等).例如,这就是它不支持 iOS4 的原因.供您参考,低功耗蓝牙是一种仅出现在蓝牙 4.0 中的蓝牙分支.即使拥有蓝牙 4.0 设备并不能确保它支持低功耗蓝牙(正如我所说,它是一个并不总是包含的叉子).作为一个简单的愿景,蓝牙低功耗的工作方式就像一个 NSDictionnary,其中包含一个 NSDictionnary.您会得到一个外设,它是具有一个或多个特性的多个服务之一.与普通设备大不相同,对吧?

Well... You need to understand one thing: CoreBluetooth framework is used for Bluetooth Low Energy and ExternalAccessory framework for the "Classic" Bluetooth. It is really two kind of different approchs of what we usually call Bluetooth (as a simple user/consumer). Only recent iDevices support Bluetooth Low Energy (iPhone from 4S, MacBook Air from 2011, etc.). That's why it doesn't support iOS4 for example. For your information, Bluetooth Low Energy is kind of a fork of Bluetooth which appears only in Bluetooth 4.0. Even if having a Bluetooth 4.0 device does not ensure that it supports Bluetooth Low Energy (as I said, it's a fork which is not always include). As a simplistic vision, Bluetooth Low Energy works like a NSDictionnary with a NSDictionnary in it. You get a Peripheral, which as one of more Services which has one or more Characteristics. Quite different from a common device, right ?

这篇关于适用于较旧 iOS 设备的蓝牙框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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