1

I am new to bluetooth development and recently started reading about it. I am trying to develop ble devices scanner and I need to provide an option to mark specific devices as trusted or untrusted.

I am able to get list of discoverable ble devices using hcitool lescan. But bluetooth addresses returned here can be random addresses. I need to uniquely identify trusted neighbouring ble devices to mark them as trusted even after changing random address. Static/public bluetooth address seems to be the only option to uniquely identify ble devices.

AFAIK static bluetooth address and IRK are shared during pairing. So after pairing with trusted BLE devices, I can get static bluetooth address and IRK which can be used for uniquely identifying trusted bluetooth devices. Also post pairing device can be uniquely identified when resolvable random address is used by paired ble device. gatttool can be used to connect to scanned BLE devices. But how can I get the static/public address after I connect to BLE device (assuming gatttool connect will perform pairing).

I am not able to find any out of the box tool like hcitool which can be used to pair to get static bluetooth address and uniquely identify when trusted ble device is scanned with resolvable random address. Is there any tool which can be used to uniquely identify trusted bluetooth device?

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
Tejas Pawar
  • 690
  • 8
  • 16
  • You are correct, the IRK and possible encryption keys are shared during pairing. But you also need to Bond the device to save the IRK and keys for your following connections. Only then you are able to resolve a so called resolvable public address. Here is a related question about pairing: https://stackoverflow.com/a/13054579/7473793 I'm not sure if this works for you! – Michael Kotzjan Jan 20 '21 at 14:30

0 Answers0