The Bluetooth SIG defines a set of Standard services for some common applications of BLE. Some examples of standard services are Heart Rate, Health Thermometer, Blood Pressure, Alert Notifications etc. We have to implement these standard services according to the BLE spec without doing any modifications which is not recommended. In addition, you can define your own Custom Services that consist of standard or custom characteristics.
Thanks for the reply.
I've been reading through the core Blueooth specification (Core_5.1.pdf) and, in my opinion, one could surmise that custom characteristics can be included as many characteristics within a defined standard service are optional and the definition for a service merely states the following:
A service is a collection of data and associated behaviors to accomplish a particular function or feature of a device or portions of a device. A service may include other primary or secondary services and/or a set of characteristics that make up the service.
Anyhow, in the meantime I am looking at alternatives.
One aspect, which I do not know much about and I cannot find any examples within the Cypress example repository is the use of a secondary service within a primary service. Any pointers?
So, what happens to the primary service behaviour, if you include a custom service as a secondary service to say Heart Rate, or Health Thermometer etc.
How is this handled by a central device, for example?
1 of 1 people found this helpful
The included services provide the additional functionality for the Service. If we include a secondary service to a primary service then the primary service will give the included services declaration as shown in the attached image(Included_service.png). This include declaration is an Attribute with the Attribute Type-0x2802(UUID for «Include»). The Attribute Value will give information of the included service Attribute Handle, the End Group Handle, and the service UUID as shown in the attached image(Include_declaration.png).
Q: I cannot find any examples within the Cypress example repository is the use of a secondary service within a primary service. Any pointers?
Ans: There is no such example. You can include any secondary service to a primary service in the profile. A secondary service is a service that is only intended to be referenced from a primary service or another secondary service or other higher layer specification.