简体   繁体   English

配对蓝牙设备是否有优势?

[英]Is there an advantage to pair a bluetooth device?

I have made an app on iOS and Android that can connect to a BLE device. 我在iOS和Android上制作了可以连接到BLE设备的应用程序。 I connect to the "device by service" and things work well. 我连接到“服务式设备”,并且一切正常。

A customer is asking me why the device is not showing in the list of bonded bluetooth devices. 客户问我为什么该设备未显示在绑定的蓝牙设备列表中。 I didn't need pairing to connect because I found code that didn't require it, but now that I think, I wonder : 我不需要配对来连接,因为我发现了不需要的代码,但是现在我想,我想知道:

What would be the benefits to have a paired device ? 配对设备有什么好处?

Would it connect faster ? 它会更快连接吗? Hold connection better ? 保持连接更好? ... ...

Security, mainly. 安全性为主。

Sending data to a non-paired device requires that the device be discoverable and open to receiving data from random devices. 将数据发送到未配对的设备要求该设备是可发现的并且可以从随机设备接收数据。 This isn't always the case for reasons of security, and so many devices ship with both disabled. 出于安全原因,情况并非总是如此,因此许多设备在出厂时都禁用了这两种功能。

The attack vector is something like this: you'll always have to pick a device in the list of discovered devices. 攻击媒介是这样的:您始终必须在发现的设备列表中选择一个设备。 It's not too difficult to create a device with "<CEO>'s iPhone" as the name and wait until he tries to send the secret memorandum to his iPhone, then intercept it. 创建一个以“ <CEO>的iPhone”为名称的设备并等待他尝试将机密备忘录发送到他的iPhone,然后对其进行拦截,并不是一件容易的事。

Additionally, bluetooth stacks have been known to have vulnerabilities that can be exploited by sending data to the device, which was made more problematic by devices auto-accepting data without confirmation. 此外,已知蓝牙堆栈具有漏洞,可以通过将数据发送到设备来利用该漏洞,而设备自动接受数据而不进行确认会使问题变得更加棘手。

Paired devices create a pre-existing relationship between the two, allowing your user to be notified when something out of the ordinary happens. 配对的设备在两者之间建立了预先存在的关系,使您可以在发生异常情况时通知您的用户。 This is always a good thing. 这总是一件好事。

It is indeed also true that not having to go through device discovery (which may take up to a few seconds) improves performance when doing the initial connection setup, but I wouldn't see that as the major reason. 的确,在进行初始连接设置时,不必进行设备发现(可能需要花费几秒钟的时间),可以提高性能,但是我认为这不是主要原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM