4

In iOS 7, I am writing a core bluetooth app to get advertising packets from a series of peripherals. Each peripheral has an unique UUID in its advertising packet and is shown in the LightBlue sniffer app.

When I detect the peripherals in a central manager it assigns an UUID that is different from the UUID in the advertising packet.

According to the docs:

"The first time a central manager discovers a peripheral, the system assigns the peripheral a UUID, represented by a new NSUUID object. Your app can store this UUID and later provide it to a central manager for use in retrieving this specific peripheral. Peripherals are identified by NSUUID UUIDs instead of by the CBUUID objects that identify a peripheral’s services, characteristics, and characteristic"

Why does it do this?

Can I read the real peripheral UUID without connecting to the device?

How?

user2984842
  • 81
  • 1
  • 7

2 Answers2

3

I think there is no such thing as a "real peripheral UUID". My understanding is that UUID (for the device/peripheral) is an Apple-specific concept, not a BLE concept. Take note of this discussion:

Corebluetooth, How to get a unique UUID?

OTOH, it appears that BLE devices do hold a IEEE-defined, unique MAC/BDADDR address. I was looking for a way to deploy platform-independent, static configurations of BLE devices. I was getting discouraged (Apple's UUIDs being +/- meaningless, and the MAC/BDADDR which can be obtained on most/all other platforms not being accessible from CoreBluetooth). Fortunately, I noticed that the "Device Information Service" profile (0x180A) contains a "System ID" attribute (0x2A23) which encodes the device's unique MAC/BDADDR address. I don't know if it is mandatory for a BLE device to expose this service, however.

Community
  • 1
  • 1
novis
  • 199
  • 1
  • 5
0

As you can see from the specification System ID is optional in the Device Information Service

Link https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.device_information.xml

And in fact DIS itself is also an optional service, e.g. The Environmental Sensing Profile defines DIS as an optional service.

Max
  • 59
  • 1
  • 4