Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
using cb library to read out sensortag uuid
-
Hi , I have a short question regarding reading out the UUID of the sensortag via peripheral.uuid using the cb library
I connected the sensortag with two different iphones and I saw that I have different uuid for the same sensortag. Why it is like this? The uuid should be the same when I connect to different Iphone, or did I understand it wrong? -
Perhaps each iPhone is on-the-fly creating a UUID as the "public key" for each tag that it sees. This is easy to do with https://docs.python.org/3/library/uuid.html and it would keep the "hardware ID" of each tag out of the public data record. You would need to study up on the sensortag to see what they have for hardware IDs.
-
Hi, yeah every iPhone is creating his own UUID for the sensortags. Thank you for the information.
I saw that they are several UUID types there, does it matter which I use? -
Look at the UUIDs that are currently being generated and see if you can determine which type they are. You should avoid using a different type.
-
@ccc Hi , I looked for that and it seems to be that randomly it will make up a device uuid. But my target is that I want a fix uuid which I can use with all types of smartphones.
See here what TI says: https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/p/277511/989118and here : https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/481652
So does it mean I can choose all of the uuid types? But the difference is not clear between them?
-
You would just make up your ok own unique value. Don't use uuid
-
@JonB , hi :). How do you mean making up my own uuid?
-
Just program your own characteristic, and hardcode each unit with a different value.
Alternatively, I think sensortag already has a serial number characteristic?
0x11 17 0x2803 GATT Characteristic Declaration 02:12:00:25:2A R Serial Number String
-
@JonB yes you are right, the alternative is quite nice and there is this Serial number string, but when Iam reading it out it says N.A ---> not available and it seems to be the same for every sensor