我可以在不结合的情况下具有加密的BLE连接吗? /配对ble设备而无需结合

发布于 2025-02-05 04:48:55 字数 462 浏览 1 评论 0 原文

到目前为止,我能够做两种不同的方式。

我可以在PI上做广告,从Android应用程序连接,然后读/写特征。据我了解,这种交流是不是加密的。

我已经能够做同样的事情,将配对和结合在混音中添加。我用代理商在PI上宣传一项服务,从Android应用程序连接,并且一旦尝试读取/编写一个特征,我会在手机上收到一个提示,要求配对。从我的理解来看,配对后,通信被加密了。

最后一部分很棒。但是,我希望在不结合的情况下配对,主要是因为我不想在蓝牙设置上获得大量设备列表。 Android似乎可以互换使用这个术语,这使一切都更加令人困惑。

我知道可以按此视频。我只是还没有想出自己的实际做法。

任何帮助都将受到赞赏。

So far I am able to do things two different ways.

I can advertise a service on the Pi, connect from an Android app, and read/write characteristics. From my understanding, this communication is not encrypted.

I have been able to do the same thing adding pairing and bonding to the mix. I advertise a service on the Pi with an agent, connect from an Android app, and as soon as I try to read/write a characteristic I get a prompt on my phone asking to pair. From my understanding, after pairing is succesful the communication is encrypted.

That last part is great. However, I am looking to pair without bonding, mainly because I don't want to end up with a huge list of devices on my bluetooth settings. Android seems to use this term interchangeably, which just makes everything more confusing.

I know it's possible to do it as per this video. I just haven't figured out how to actually do it myself.

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

醉城メ夜风 2025-02-12 04:48:56

根据蓝牙协议规范,这是完全可能的。如果在配对请求或配对响应的authreq字段中,至少一个设备将“键信标志”设置为“无键”,则不得永久存储键合信息。

如果您使用的是Bluez,我不确定它是否允许您配置。

对于Android,人们报告说Android不尊重这张标志,而无论如何都会创建债券(为什么即使要求不键合的android键?)。

This is totally possible according to the Bluetooth protocol specification. If at least one device sets "bonding flags" to "no bonding" in the AuthReq field of the Pairing Request or Pairing Response, no bonding information shall be permanently stored.

If you're using BlueZ, I'm not sure if it allows you to configure this though.

For Android, people report that Android does not respect this flag and creates a bond anyway (Why does Android bond even when asked not to bond?).

嘴硬脾气大 2025-02-12 04:48:56

从技术上讲,配对是将密钥与远程设备交换的过程,而键合是存储这些键的过程。一些设备使用术语“配对”来表示键交换并加密连接,但是将不会存储键以供将来使用。据我所知,在Android上,这是不可能的,您始终需要存储钥匙。这可以在下面的链接中看到(请参见与BLE设备 ): -

android ble的最终指南

其他一些有用的链接: -

Technically speaking, pairing is the process of exchanging the keys with a remote device, while bonding is the process of storing these keys. Some devices use the terminology "pairing" to indicate the the keys are exchanged and the connection is encrypted, but the keys will not be stored for future use. On Android this is not possible as far as I'm aware, and you always need to store the keys. This can be seen in the link below (see the section Bonding with a BLE Device):-

The Ultimate Guide to Android BLE

Some other useful links:-

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文