This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unique Identifier for SensorTag across devices

I'm working on an iOS app that communicates with some SensorTag sensors. I want to be able to uniquely identify each sensor so that every user will know which sensor they are communicating with.

Currently, on iOS, using the CBPeripheral class, I get a UUID for each BLE device I connect with, but those ID values are different from each iphone/ipad I use to connect with the sensor.

Is there any way to get an ID for each sensor that is unique but consistent across different devices?

Thanks,

Liron

  • Hi Liron - I am facing a similar problem. The Sensor Tag user guide says that "The TI Base 128-bit UUID is: F0000000-0451-4000-B000-000000000000". 

    But F0000000-0451-4000-B000-000000000000 is actually the UUID of the IR temperature service. I am pretty sure this is a unique value and it will remain the same regardless of while device you connect from. But catch is, you cannot get hold of this UUID until connect to the peripheral (Sensor Tag) and discover the services. This could work for you if you are OK connecting to the peripheral to get a unique ID.

    In my case, I want to get a uniqueID just by scanning the peripheral. All i can get is only the peripheral.name which is "TI BLE Sensor Tag". peripheral.UUID will be different when i connect from different devices because it is generated by iOS.

    My problem is : If I have two TI sensor tags. How can i differentiate one vs other just by scanning them? peripheral.name says "TI BLE Sensor Tag" for both?????

    Thanks

    Ashok

  • Hi,

    The base UUID is not for the device, it's for the 128bit proprietary characteristics.

    It's a limitation in iOS that you don't have access to the actual address but only a random device uuid made by ios. I suggest you add a unique identifier to the advertising data.

    BR,
    Aslak 

  • How can I do that with the TI SensorTag?

    Would that ID be available for query without actually connecting to the device (just scanning)?

    Thanks,
    Liron 

  • Hi,

    You find the array that contains the advertising data. Possibly called uint8 advData[] { ... };

    You then add 0x03, 0xFF, 0xAB, 0xBA to the end of this array. 3 is length of the nugget, FF is manufacturer (you) specific data and ABBA is a swedish pop band from the 80's.

    If applicable you increase the declared length of the advData array accordingly.

    Instead of ABBA you could include the last two octets of the device address, an increased count, or something else that is semi-unique.

    Best regards,
    Aslak 

  • Hi,

    The original post in this thread summarizes the issue I have been trying to resolve. However, I am a bit unclear if it was answered.

    I need to be able to identify a specific sensor. Currently, I am unaware of a characteristic or a characteristic value which is unique to each sensor.

    I would appreciate hints on how to archive this.

    Dani