你可以在iOS应用程序中配对蓝牙LE设备吗? [英] Can you pair a bluetooth LE device in an iOS app

查看:132
本文介绍了你可以在iOS应用程序中配对蓝牙LE设备吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以在iOS应用中配对蓝牙LE设备,即不通过设置。试图让用户更容易与特定设备配对。

Can you pair a bluetooth LE device in an iOS app, i.e. not via Settings. Trying to make it easier on the user to pair with a specific device.

如果是这样的话?

推荐答案

您不能通过系统设置配对蓝牙LE设备。通常,您根本不与蓝牙低功耗设备配对。唯一需要配对的时间是设备具有标记为需要加密的属性 - 尝试读取此属性将触发配对过程,但在您阅读之前,您需要发现并连接到设备。

You don't pair Bluetooth LE devices through system settings. Generally you don't pair with Bluetooth Low Energy devices at all. The only time that pairing is required is when the device has an attribute that is marked as encryption required - attempting to read this attribute will trigger a pairing process, but before you can read you need to discover and connect to the device.

发现和连接由Core-Bluetooth框架处理。

Discovery and connection is handled by the Core-Bluetooth framework.

核心蓝牙编程指南完成各个步骤需要使用 CBCentralManager 来发现并连接到BLE外设。

The Core Bluetooth Programming Guide goes through the steps required to use a CBCentralManager to discover and connect to a BLE peripheral.

这篇关于你可以在iOS应用程序中配对蓝牙LE设备吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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