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?