唯一识别BTLE设备的方法 [英] A way to uniquely identify a BTLE device

查看:66
本文介绍了唯一识别BTLE设备的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以唯一标识BTLE设备(类似于硬件ID)?我有2个硬件BTLE设备和2个软BTLE设备(使用CBCentralManager)。所有这些设备都发送相同的UUID。

Is there a way to uniquely identify a BTLE device (something like hardware ID)? I have 2 hardware BTLE devices and 2 soft BTLE devices (using CBCentralManager). All these devices are sending same UUID.

当所有设备都在我身边时,我想确定确切的BTLE设备。有任何线索吗?

I want to identify the exact BTLE device when all the devices are lying near me. Any clue?

推荐答案

设备应具有唯一的蓝牙地址。如果没有,那么您将无法正确连接它们,而不会彼此干扰。但是,使用BTLE可以使设备拥有用于保护隐私的随机地址(但这些地址符合特定格式,因此您可以检测到是否获得了这种地址)。地址为6个字节,通常以十六进制显示(例如 A1-B2-C3-D4-E5-F6 )。前2个字节通常表示制造商。

The devices should have unique Bluetooth addresses. If they don't then you wouldn't be able to properly connect to them without them interfering with each other. However, with BTLE it's possible for a device to have a randomized address for privacy (but those conform to a particular pattern so you can detect if you get that kind of address). The address is 6 bytes and is usually displayed in hex (ex A1-B2-C3-D4-E5-F6). The first 2 bytes usually indicate the manufacturer.

更新:我的回答对大多数BLE使用均有效,但由于该问题被标记为的问题,您可能要查看关于在ios上获取唯一ID的另一种答案作为获取蓝牙地址的一种可能方式

UPDATE: My answer is valid for most BLE usage, but as the question is tagged ios you may want to look at this other answer about getting a unique id on ios as a possible way to get the bluetooth address

这篇关于唯一识别BTLE设备的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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