This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to find 128 bit uuid services with sd_ble_gattc_primary_services_discover

I am using the heart_rate_collector example code as a base of understanding of the Nordic stack. I have a device I am trying to connect to and the primary service I want to use is marked as an unknown service with a 128 bit uuid. It is the fourth service in the list when I connect to the device with the nordic phone app.

I figured out that passing a NULL to the last parameter of sd_ble_gattc_primary_service_discover tells it to report all services for the device (at least I think so). The BLE_GATTC_EVT_PRIM_SRVC_DESC_RSP event report 3 services and indeed the uuids match the uuids of the first 3 services. They are all known uuid values.

I also noticed the event returned after the sd_ble_gattc_characteristics_discover call also returns 3 characteristics available although there are 5. I did some trying and found out that I can change the value to the start_handle and it will start higher in the sequence and return the other characteristics.

Is there a maximum number of values can be returned at a time and it is 3?

I tried changing the start handle argument to sd_ble_gattc_primary_services_discover from 1 to 2 and now it returns 2 services with the first one missing. So the limit of 3 does not seem to be the answer.

How do I get it to discover the 128bit uuid service?

Thanks in advance for any help,

Johnnie

Parents Reply Children
No Data
Related