Get MAC Address of Bluetooth Low Energy Peripheral in iOS

Get MAC address of bluetooth low energy peripheral in iOS


Updated Answer :-

After iOS 12 we can get UDID

   print(UIDevice.current.identifierForVendor)

print(UIDevice.current.identifierForVendor?.uuidString)

Before iOS 12**

There is no public API to get this information.

If this is an internal or jailbreak application you can get the value of the kLockdownBluetoothAddressKey key via liblockdown.dylib

How to get Mac Address From CBPeripheral And CBCenter

You can't get the MAC address for a CBPeripheral but you can get the identifier property, which is a UUID that iOS computes from the MAC amongst other information.

This value can be safely stored and used to identify the same peripheral in the future on this particular iOS device.

It cannot be used on another iOS device to identify the same peripheral.

Ionic BLE Android Ble is retrieving MAC address of the peripheral different than IOS Ble

The "MAC address/ID" on iOS is not a MAC address. You're reading the identifier property. That's a UUID created by the phone. It's generally consistent for a given device, but may change over time (though never during a single connection, and they don't generally change that often).

There is no way to get the MAC address of a CBPeripheral on iOS. There is no way to uniquely identify a BLE device on iOS in a way that is consistent across iOS devices, or that is promised to be permanent on a single iOS device.

iOS - Get peripheral's MAC address from CBPeripheral object

In iOS not possible to get mac address of CBPeripheral object. If CBPeripheral object advertisement mac address in "kCBAdvDataServiceData" value then convert to mac address, otherwise not possible. In iOS unique id is UUID for CBPeripheral. Every diff. iOS device shows diff. UUID of same CBPeripheral. If differentiate two or more CBPeripheral object then use RSSI range/value.

How can i get MAC of a device through BLE in iOS

No any public API for getting MAC address with BLE.

If you want to get with jailbroken device, then you can get with this link

iOS not showing BLE devices that have specific MAC addresses

If you have assigned static random addresses, they must start with C, D, E or F. In the current standard, random addresses are not allowed to start with 8, 9, A or B as there is no address type associated with that block. See the section called "Device address" in the Link Layer specification for more info.



Related Topics



Leave a reply



Submit