简体   繁体   中英

Is there any way to uniquely identify BLE device?

I want to store information about BLE device locally, but I cannot rely on MAC address because it changes too often. Is there any way to do that?

The Bluetooth address is the best way you can distinguish between devices. This is mentioned in the Bluetooth specification as follows [1]:

Devices are identified using a device address. Device addresses may be either a public device address or a random device address. A public device address and a random device address are both 48 bits in length

As Mike mentioned, there are a few types of MAC Addresses and the one that is changing is not the one that you want to look at. The Bluetooth specification identifies the following addresses:-

  • Public Address : This is a unique address created in accordance with IEEE 802-2014 Standard. For you this is the Address relevant to your answer.
  • Random Static Address : This is a randomly generated address that does not change unless the device is power cycled. Therefore, if your device is not power cycled you can use this address to identify it.
  • Private Resolvable Address : This is a changing MAC address (with the frequency of the change depending on the application) that can be resolved and associated with the device's unique address if the IRK is known (ie if the devices are paired).
  • Private Non-resolvable Address : This is a changing MAC address (with the frequency of the change depending on the application) that cannot be resolved nor associated with the device's unique address. This kind of address is usually used for security reasons when a device only advertises.

For more information, please see the reference below.

I hope this helps.

[1] Bluetooth Core Specification Version 5.0, Vol 6, Part B, Section 1.3 DEVICE ADDRESS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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