0

I want to fetch UUID of a bluetooth device (like iBeacon but not iBeacon) by scanning, but wasn't successful so far.

I have tried CBPeripheral but it's returned uuid does not match with the real values.

Please suggest me how to find UUID / MAC address of bluetooth devices.

I have used following Code:

 func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
    if(!peripherals.contains(peripheral)) {
        print(peripheral.identifier)
        peripherals.append(peripheral)
    }
}
Mohamad Sheikh
  • 283
  • 2
  • 7
Bhumesh Purohit
  • 491
  • 1
  • 8
  • 26
  • Which UUID are you reading? Not that you shouldn't be able to read the MAC Address not the real UUID which are a mix between timestamp, MAC address etc and might be different another time except if your pair with it. – Larme Sep 29 '18 at 16:42
  • CoreBluetooth does not provide access to the underlying MAC address of the peripheral. You could put a unique identifier in a characteristic on your peripheral which you could then read. – Paulw11 Sep 29 '18 at 20:56

0 Answers0