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

Can't find 128-bit UUID and service name

Hi , I use the pc-ble-driver to developer desktop tools, like nRF Connect. Unfortunately,  I don't know Java. I‘ve tried to used examples that work(heart_rate_collector and heart_rate_monitor). So, I use the example heart_rate_collector as template. I can found all services, but can't find the 128bit UUID and services name. How can I found the 128-bit UUID and each services name?

 

    As shown in the figure above, I can reach the services, but I can't find the 128-bit UUID. And also I don't know how to find this services name?

    If I want to use C++ develop a progarm like nRF connect. Can you give me some examples with more functions or some docs?

Parents Reply Children
  • HI ,

         Thanks. 

         I found only use handle also can establish a connection. But I still want to search all UUIDs.. How can I do that if I don't want add the specified base ID in advance ?  BYT, How Can I search out all service , characteristic and characteristic description?  Should I search all services first, then all characteristics, and finally all characteristic description? Or Should search services -> characteristics -> characteristic description then loop searches? Which search method is better?

  • Hi,

    It is possible to discover services without knowing the UUIDs beforehand. To do that you need to pass a NULL pointer for the p_srvc_uuid input argument. The response will say BLE_UUID_TYPE_UNKNOWN whenever a new 128-bit service is discovered (ie one that hasn't been added with ble_vs_uuid_add()). You can then perform a GATT read on that handle to retrieve the UUID.

    Here is how this is handled in the Python wrapper: https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/8e5a9ffb7b6a655baeae7e4591f3ffc50cd62a5b/pc_ble_driver_py/ble_adapter.py#L266. Notice how the 128-bit base uuid gets added through ble_vs_uuid_add() after.

    Relevant doc links:

    - sd_ble_gattc_primary_services_discover

    - GATTC Primary Service Discovery

    peter li said:
    BYT, How Can I search out all service , characteristic and characteristic description?  Should I search all services first, then all characteristics, and finally all characteristic description? Or Should search services -> characteristics -> characteristic description then loop searches? Which search method is better?

    It seems like most implementations do it sequentially and start with the discovery of all services first, then proceed with all characteristics and descriptors (you can see this from the python wrapper implementation linked to above).

Related