【发布时间】:2013-10-05 19:59:43
【问题描述】:
好吧,这是我的问题。我知道,可以将 iphone 连接到低功耗蓝牙设备(例如 Polar Heart Rate Belt),然后在我的应用程序中处理此非 iOS 设备提供的数据。但是可以同时将我的 iphone 与 2 条皮带连接吗?所以我可以使用每一个提供的数据。
【问题讨论】:
标签: iphone ios bluetooth-lowenergy
好吧,这是我的问题。我知道,可以将 iphone 连接到低功耗蓝牙设备(例如 Polar Heart Rate Belt),然后在我的应用程序中处理此非 iOS 设备提供的数据。但是可以同时将我的 iphone 与 2 条皮带连接吗?所以我可以使用每一个提供的数据。
【问题讨论】:
标签: iphone ios bluetooth-lowenergy
发现并连接到所有 HR 传送带设备。你也可以在 iOS7 中使用retrieveConnectedPeripherals。然后注册每个外围设备上的心率值特征通知:
[currentPeripheral setNotifyValue:notify
forCharacteristic:self.heartRateCaracterisctic];
当didUpdateNotification 触发时,您的代理将收到一个 CBPeripheral 实例 - 使用它来确定哪个外围设备发送了新值:
(void)peripheral:(CBPeripheral *)peripheral
didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic
error:(NSError *)error
【讨论】: