[英]Is Bonding required for BLE <-> Android, iOS device communication?
We have a BLE device and android/ios app for communication with the device.我们有一个 BLE 设备和 android/ios 应用程序用于与设备通信。
The requirement is to have an android/ios app connect to the device without any pairing request.要求是在没有任何配对请求的情况下将 android/ios 应用程序连接到设备。 No security is required on the device.
设备上不需要安全性。
Hereafter a few questions around this:以下围绕这个问题提出几个问题:
Please see answers to your questions below:-请在下面查看您的问题的答案:-
You can find more details about pairing/bonding and general BLE communication is the answer below:-您可以找到有关配对/绑定和一般 BLE 通信的更多详细信息,答案如下:-
Should one create a bond with a Bluetooth LE device 是否应该与蓝牙 LE 设备建立联系
I would also recommend trying the nRF Connect app on both iOS and Android to see the difference between connection and bonding and to verify that you can have normal connections without pairing.我还建议在 iOS 和 Android 上尝试nRF Connect应用程序,以查看连接和绑定之间的区别,并验证无需配对即可正常连接。
Based on what we got working and based on the answers to this question.基于我们所做的工作以及对这个问题的回答。
To add to Youssif's answer:添加到优素福的答案:
A3: one difference is that connection setup will be faster since bonding allows the GATT db cache to be used. A3:一个区别是连接设置会更快,因为绑定允许使用 GATT db 缓存。 Otherwise service rediscovery must be done on every connection (if the service changed characteristic is present).
否则,必须在每个连接上进行服务重新发现(如果存在服务更改特征)。
A4: on Android you can call createBond
to start pairing, but on iOS there is no API for the security, so either you need to interact with a characteristic that sends an error that pairing is needed, or the remote device can send a Security Request to initiate pairing. A4:在 Android 上,您可以调用
createBond
开始配对,但在 iOS 上没有 API 用于安全性,因此您需要与可以发送错误请求的远程设备交互,或者需要配对安全性,开始配对。
A5: iOS shows a dialog "accept / abort" for just works, Android doesn't. A5:iOS 显示一个对话框“接受/中止”,以便正常工作,Android 没有。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.