Can you pair a bluetooth LE device in an iOS app

最后都变了- 提交于 2019-11-30 15:52:51

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.

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

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

According to the BT SIG Security Manager documentation you can pair/Bond ble devices if they respond to the message that is. You can also wait and do it as previously explained from the peripheral side. Some devices like HipKey does this automatically when connecting first time. Look at BTSIG Security Manager specifications. On Android this also works from BT settings menu IF the peripheral supports it.

Bonding and Authenticating are usually confused but om most platforms it means the same.

A good way to try this out is by buying the TI ble development kit. Its cheap. It comes with a USB dongle and SW which can be used to initiate pairing like from the settings menu.

To do it from iOS just connect and read a known encrypted characteristic.

Cases where you want to "pair" (remember a Bond) includes Pulse meters, hearing aid, keyboard and other private units.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!