Accessing different services with pc-ble driver

Hello,

I try to connect a BLE application with my PC by using an nRF52840 dongle and the PC-BLE driver. But I got stuck in the understanding of the driver, so I hope that someone can help me.

The ESP32 provides two additional services: 

  • A device information service
  • A battery service

I run a modified version of the BLE driver from a Qt application and the service discovery outputs three services

"Received service discovery response. Service count: 3"
" Service UUID: 0x1800"
" Service UUID: 0x1801"
" Service UUID: 0x180a"

But where is the fourth service? I only got the two common services and the device information service, but the battery service is missing.

How can I use multiple services with the BLE driver? I have figured out that I can store the handles of each service by looping through each service after the discovery. And I assume that I have to use each handle to access a discovered service?

And I´m looking for an example for reading / writing some values from the characteristics of a given service. Do you have an example?

Thank you for your help Slight smile

Parents
  • Hi  ,

    yes I have checked it and it helps. But I´m looking for a more generic way to discover all services without letting the application know how many services it should discover. Is there a way to iterate through

    sd_ble_gattc_primary_services_discover

    until all services are discovered? How can I get feedback that the application doesn´t have discovered all services? I´m missing how I can implement the handling of different services with the pc-ble-driver. Is there an example how to do it?

Reply
  • Hi  ,

    yes I have checked it and it helps. But I´m looking for a more generic way to discover all services without letting the application know how many services it should discover. Is there a way to iterate through

    sd_ble_gattc_primary_services_discover

    until all services are discovered? How can I get feedback that the application doesn´t have discovered all services? I´m missing how I can implement the handling of different services with the pc-ble-driver. Is there an example how to do it?

Children
Related