iOS to Mac OS X [core] bluetooth data transfer(iOS 到 Mac OS X [核心] 蓝牙数据传输)
问题描述
我的目标是通过蓝牙在运行 iOS 的设备和运行 Mac OS X 的设备之间建立连接.我知道我可能可以为此使用 CoreBluetooth,但我不明白怎么做,因为我没有看到在 iOS 设备 上设置服务并将其作为可用服务广播的方法运行 Mac OS X 的设备.换句话说,我只是想建立一个连接来让 iOS 设备 将数据发送到 Mac OS X 设备.另外,我将如何指定如何设置服务的属性.我试过研究这些东西,但大多数文档对我来说意义不大.数据传输很小,因此蓝牙足以胜任这项工作.我试图避免 Bonjour 和 P2P 的游戏中心框架,因为 OS X 无法处理(我认为).
My objective here is to create a connection between a device running iOS to a device running Mac OS X, via bluetooth. I know that I might be able to use CoreBluetooth for this but I don't understand how since I don't see a method to setup a service on the iOS device and broadcast it as an available service for a device running Mac OS X. In other words, I simply want to setup a connection to get the iOS device to send data to the Mac OS X device. Also, how would I go about to specify how to setup properties of the service. I've tried researching this stuff but most of the documentation makes little sense to me. The data transfer is small so bluetooth is good enough for the job. I'm trying to avoid Bonjour for this, and the Game center framework for P2P since OS X can't handle that (I think).
推荐答案
在 iOS6 中,iPhone 4S、5 和 New iPad 可以在蓝牙智能/低功耗模式下作为外围设备和中央设备工作.尝试从APP Store下载LightBlue"APP.它可以让您将 iPhone4S 或 5 设置为带有随机服务的外围模式,然后您可以从 Mac 上读取这些服务(如果您有更新的 BT Low Energy,我使用 Retina,但新的 iMac 和 Mac Mini 也有 BT低能量).
In iOS6 the iPhone 4S, 5 and New iPad can work both as Peripheral and as Central in Bluetooth Smart / Low Energy mode. Try downloading "LightBlue" APP from APP Store. It let's you put the iPhone4S or 5 into Peripheral mode with random Services which you can then read from the Mac (if you have a newer one with BT Low Energy, I use the Retina for that but also the new iMac and Mac Mini got BT Low Energy).
您是正确的,核心蓝牙仅允许访问不允许 MFI 芯片的低功耗蓝牙.
You are correct that Core Bluetooth only give access to Bluetooth Low Energy which doesn't allow for the MFI chip.
这篇关于iOS 到 Mac OS X [核心] 蓝牙数据传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:iOS 到 Mac OS X [核心] 蓝牙数据传输


- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01