Can you add a custom characteristic to a standard GATT service (Bluetooth4.2/Bluetooth5.0 component)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GeIo_1586191
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

I noticed in PSoC Creator 4.2 that in both the Bluetooth 4.2 component (for PSoC4) and the Bluetooth 5.0 component (for PSoC6) you cannot add in a custom characteristic to a standard Gatt Service (e.g. 181A Environmental Sensing, 180F Battery, 1809 Health Thermometer, etc.) via TopDesign config.

I assume this was intentional but I'm unsure of the reasons why.

Maybe someone can enlighten me.

Thanks

0 Likes
1 Solution

Hello,

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.

Thanks,

P Yugandhar.

View solution in original post

3 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

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,

P Yugandhar.

0 Likes
GeIo_1586191
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

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:

6.5.1 Service

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?

0 Likes

Hello,

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.

Thanks,

P Yugandhar.