Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将iphone与2台低能耗设备连接_Iphone_Ios_Bluetooth Lowenergy - Fatal编程技术网

将iphone与2台低能耗设备连接

将iphone与2台低能耗设备连接,iphone,ios,bluetooth-lowenergy,Iphone,Ios,Bluetooth Lowenergy,好吧,这是我的问题。我知道,可以将iphone连接到蓝牙低能设备(如Polar心率带),然后在我的应用程序中处理这个非iOS设备提供的数据。但有可能同时用两条皮带连接我的iphone吗?因此,我可以使用每个表中提供的数据 发现并连接到所有HR传送带设备。您还可以在iOS7中使用检索连接的外围设备。然后注册每个外围设备的心率值特征通知: [currentPeripheral setNotifyValue:notify forCharacteristic:self.heartRateCar

好吧,这是我的问题。我知道,可以将iphone连接到蓝牙低能设备(如Polar心率带),然后在我的应用程序中处理这个非iOS设备提供的数据。但有可能同时用两条皮带连接我的iphone吗?因此,我可以使用每个表中提供的数据

发现并连接到所有HR传送带设备。您还可以在iOS7中使用
检索连接的外围设备。然后注册每个外围设备的心率值特征通知:

[currentPeripheral setNotifyValue:notify 
    forCharacteristic:self.heartRateCaracterisctic]; 
didUpdateNotification
触发时,您的Delegate将收到一个CBPeripheral实例-使用该实例确定哪个外围设备发送了新值:

(void)peripheral:(CBPeripheral *)peripheral 
    didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic 
    error:(NSError *)error 

好吧,这样你就可以从两个设备上检索数据了。稍后我将尝试您的代码,ty=)