Reputation: 513
I am defining a custom GATT profile and have some questions which I could not find definite answers of on Bluetooth specifications.
Can there be multiple characteristics of same type (UUID) defined in a single service?
Can there be variable number of characteristics of same type (UUID) in a service? For example, depending upon system operation, a peripheral can accumulate variable number of copies of some data. Can these copies be sent as characteristics to the central when asked for?
Suppose we have a table of data and we want to give access to it in two forms – row wise and column wise. Can such a requirement be handled in terms of characteristics? I imagine it like if you request for reading the characteristic with UUID A, it will be read in rows and UUID B will be in columns; is it possible and the right way to do so?
Upvotes: 1
Views: 124
Reputation: 136
I've just found this unanswered question. Not sure if it's still needed, but here's my answer:
Yes. Page 2224 (Vol.3, PartG: Generic Attribute Profile: 3.3.1.Characteristic Declaration) of Core_v4.2.pdf says: "A service may have multiple characteristic definitions with the same Characteristic UUID".
Yes, it's possible. But in this case you must implement ServiceChanged characteristic. See Vol.3, PartG: Generic Attribute Profile: 2.5.2.Attribute Caching and 7.1.Service Changed.
Yes. It is up to your implementation to define what data is hidden behind custom characteristics.
Upvotes: 1