cancel
Showing results for 
Search instead for 
Did you mean: 

Code Examples

BRFL_4822626
New Contributor II

Hello:

I am trying to add a custom service to the example code in CE217643 i.e. the BLE Temperature Measurement

with PSoC 6 MCU with BLE Connectivity, Health Thermometer Profile example application.

I have added a custom service to the ble GATT server via the schematic BLE block parameters tool.  

The custom service has only one custom characteristic, the default uint8 field with read prosperities set.

The custom descriptor had one field the uint8 default.

I was looking for where the event handler or callback was/is for the custom service so I could access the custom characteristic value.

Why in the generated code module cyble_custom.c function Cy_BLE_CUSTOM_EventHandler... is there no code for handling a CY_BLE_CUSTOM_SERVER that my example is?

How ? and where ? do I write the Cy_BLE_CUSTOM_EventHandler for a CY_BLE_CUSTOM_SERVER?

What events in the handler do I need to look for, and what is in them?

Thanks Brian

0 Likes
1 Solution
Yugandhar
Moderator
Moderator

Hello,

Please refer to the attached project where I added a custom service to the "CE217643 BLE Temperature Measurement" Code example. This custom characteristic is set with Indicate, Write and Read Properties.

 

Thanks,

P Yugandhar.

View solution in original post

0 Likes
2 Replies
Yugandhar
Moderator
Moderator

Hello,

Please refer to the "CE222046_GATT_OUT" code example in the PSoC creator. This code example uses the custom service in the GATT profile for sending the data to the central device.
You can also refer to the "AN91162 - Creating a Bluetooth Low Energy Custom Profile" datasheet. It provides an overview of custom profiles and services and the procedure to build an application with PSoC 4 BLE using RGB LED control as an example. For PSoc 6 BLE devices BLE APIs, Structures will differ.

Thanks,
P Yugandhar.

0 Likes
Yugandhar
Moderator
Moderator

Hello,

Please refer to the attached project where I added a custom service to the "CE217643 BLE Temperature Measurement" Code example. This custom characteristic is set with Indicate, Write and Read Properties.

 

Thanks,

P Yugandhar.

View solution in original post

0 Likes