We are currently developing a family of products that will use Bluetooth and I am putting together the plan for the profiles for each product.
I have structured the profiles so that there is much reuse as possible between products. There are services that will be identical across products, this seems straightforward.
Where I am questioning the structure is where there are characteristics that are common between services and whether my structure is the right way to do it, and more importantly, will it cause any unforeseen issues.
My current structure is something like this:
Product Apple - Service 1 - Characteristic A Characteristic B Service 2 - Characteristic C - Characteristic D Service 3 - Characteristic E Product Banana - Service 1 - Characteristic A - Characteristic B Service 4 - Characteristic F - Characteristic G Characteristic C
Service 1 is shared between the two products, all good.
The structure of the UUIDs are that Characteristic A and B share the same base UUID as Service 1 but the second group of 16 bits are incremented, all good.
Where I start questioning this is when Service 4 comes into play and has the same characteristic (Characteristic C) as Service 2.
Characteristic C does not use the same base UUID as Service 2 or 4 - I gave it a different base as it is shared but does have the same UUID when used in Service 2 and 4.
The idea being that I could reuse the same code to create that characteristic (and the mobile app that will eventually connect to the product could do the same) and call it from Service 2 and 4.
Are there any issues with this approach? Am I likely to come into any issues reusing the UUID for the characteristics like this? Are there any best practices I am violating doing it this way?