Hi dialog
I am working on a custom board based on DA14681, and in firmware i am using around 7-8 services. They are working fine. I want to add 5 more services. Is there any limit for number of services? If yes then how many? And do they affect performace of overall setup?
Thanks
Device:
Hi mahmed106,
There is no meaningful limit to the number of services you can implement, but the number of services and characteristics has a negative impact on user friendlyness because service discovery during connection will take a long time. A lot of services also require a lot of memory, so you will have to be mindful of this.
If you are implementing support for a lot of standard BT SIG adopted profiles, you really have no choice, but if you are implementing your own custom services, you can improve your design by limiting these to one custom service with just a few characteristics. This is done by using one characteristic as a command field - often referred to as a control point. You can write various commands to this characteristic and even implement support for arguments. Your firmware would then interpret the command and arguments into some meaningful action and send the response to the command back to the client via GATT notify. There are several advantages to this approach (and no disadvantages comes to mind!)
You can have a look at how our CodeLess (DA14585) is implemented. One characteristic receives a number of different commands with various number of arguments as described above.
/MHv