I faced a problem about CoreBluetooth Framework.
As Example, I have two devices and each device performs both advertising and scanning. So, I use CBCentralManager
and CBPeripheralManager
on each.
So, to simplify problem, let's assume that Device1 is broadcasting and Device2 scanning.
When CBCentralManager
on Device2 discover the Device1, callback
centralManager:didDiscoverPeripheral:advertisementData:RSSI:
is called and I can get Device1 identifier by calling [peripheral.identifier UUIDString]
.
How then I can get my local device (Device2) Identifier? I mean in case that both devices are advertising, Device1 will discover Device2 too and get it's peripheral identifier, but How can I get exact this identifier (some kind of self-address) on Device2?
P.S. I know that this Identifier is not unique for each device and can change over the time, it's not a problem.