I am developing an Android app to work with a BLE device which has the same characteristic UUID in two different services.
From looking at the easyble.js code, it seems to store all characteristic UUIDs discovered from the device in a single table indexed by the UUID value itself. This means that the first occurrence of the characteristic will be overwritten by the second and that the readCharacteristic() call will never return the value of the first instance.
Having read "Bluetooth Low Energy, The Developers Handbook", it appears that having the same characteristic UUID in different services is allowed (see section 14.6 for an example). This would mean that to handle this case the readCharacteristic() call would also need the service UUID as well as the characteristic UUID so that the correct characteristic can be found.
Am I right?
At the moment it looks like I will have to implement a routine called readServiceCharacteristic() which will take both a service and a characteristic UUID.
Mike
Same characteristic, different service
Re: Same characteristic, different service
Your analysis appears to be correct and useful. Thanks!
The underlying BLE plugin tracks characteristics by integer handle rather than UUID, so a function readServiceCharacteristic() is definitely possible.
We'll want to have such a function ourselves, so I've opened an issue for it.
The underlying BLE plugin tracks characteristics by integer handle rather than UUID, so a function readServiceCharacteristic() is definitely possible.
We'll want to have such a function ourselves, so I've opened an issue for it.
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 60 guests