DiscoverPrimaryServiceByUuid How to?

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

cross mob
ChGa_3545231
Level 2
Level 2
First like given

Hi everyone,

I am currently working on a project in which I want to use the DiscvoerPrimaryServiceByUuid Function.

My question here is, what do I have to do with the return event?

Do I have to store the given values in the DB or to some handles.

I couldn't find any good example showing this.

Thanks

Chris

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Chris,

CyBle_GattcDiscoverPrimaryServiceByUuid() function is used by the GATT Client to discover a specific primary service on a GATT Server, to which it is connected, when the Service UUID is known. This function initiates multiple Find By Type Value Requests to peer device and receives Find By Type Value Response from the peer device.

In the client CYBLE_EVT_GATTC_FIND_BY_TYPE_VALUE_RSP event will be received and the event parameter is a pointer to a structure of type CYBLE_GATTC_FIND_BY_TYPE_RSP_PARAM_T. This structure will contains the details of Handle Range list and size of list of particular UUID of peer device. Please refer the structure in the BLE component for more information.

Please refer the Example project Day020_BLE_UART example project in the GitHub for more information.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
2 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Chris,

CyBle_GattcDiscoverPrimaryServiceByUuid() function is used by the GATT Client to discover a specific primary service on a GATT Server, to which it is connected, when the Service UUID is known. This function initiates multiple Find By Type Value Requests to peer device and receives Find By Type Value Response from the peer device.

In the client CYBLE_EVT_GATTC_FIND_BY_TYPE_VALUE_RSP event will be received and the event parameter is a pointer to a structure of type CYBLE_GATTC_FIND_BY_TYPE_RSP_PARAM_T. This structure will contains the details of Handle Range list and size of list of particular UUID of peer device. Please refer the structure in the BLE component for more information.

Please refer the Example project Day020_BLE_UART example project in the GitHub for more information.

Thanks,

P Yugandhar.

0 Likes

Thank you, I think this will help.

Chris

0 Likes