This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Production UUIDs

The iOS app we have is identifying the device via the name broadcasted and the service UUID. On production devices, are the Service UUIDs on the same product, the same on all devices. For instance, do all FitBits use the same Service UUID? Or do you generate a new 128-bit service UUID for every device? Am I getting it all wrong? Is there a different or better way?

Can an iOS device differentiate between devices with the same name and UUID?

  • Hi George,

    Products with BLE use the same UUID across all device. Using a different UUID is not practicable. For example, on products we develop we have custom services with 128-bit UUID, but these are all the same across the products.

    Differentiating a device in iOS depends on 2 things:

    1. When iOS discovers a device the first time it generates a unique UUID (NSUUID) which identifies the device uniquely and depends on a few parameters This ID can be used to reconnect to the device (for example when your app is started at a later time). Therefore you can identify a device from others in the environment.

    2. It's useful sometimes to use the device information service to put a unique serial # into the device. This serial # would be programmed at the factory. This gives you the ability to track the device over its lifetime. You can leverage other parameters of the Device Information service to get more information. I'd avoid relying on the name on the off chance other devices have similar names.

    iOS does differentiate devices with same name and UUID (I assume you mean UUID of service in advertisement packet) because it takes into account the MAC address and other parameters.

    UUIDs of services should remain the same across all the devices, otherwise your app will have to account for every single device (an impossible and unnecessary task).

  • I'll add to this that the Manufacturer Specific data section of the advertisement packet is a useful place to add device specific information to help your app(s) differentiate between different devices.

    Also, I agree with not relying on the name. In fact, the name doesn't really help much other than visually and during development. In production, advertising a name wastes bytes in the advertising packet and makes the advertising packet longer thereby using slightly more power to transfer extra bytes. Might as well put those extra bytes to better use in helping your app identify a specific device.

Related