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

Concurrent services discovery

I am using S132 4.0.2 and SDK 13, and I have theese questions:

  1. I have an application where BLE node establishes multiple concurrent connections (several as central and several as peripheral). They will start db discovery on each other regardless of GAP role in connections. So peripheral will discover central services and central will concurrently discover peripheral services. Will it work? I it even a good idea?

  2. As my BLE node can be connected to many other peers db discovery can be started concurrently on each connection. I have separate ble_db_discovery_t per connection. Will it work?

  3. How can I be notified that service disvovery process is finished (I have several services to discover)? There is lack of event 'db discovery process finished'. I can always count events and compare it to number of ble_db_discovery_evt_register calls but is there a better way?

What else should I know, the tutorial devzone.nordicsemi.com/.../ is good but a bit outdated.

  • Yes, you can always skip the library and use sd_ble_gattc_primary_services_discover () and sd_ble_gattc_characteristics_discover () directly. I think if we break the ble_db_discovery code down we can see it will call exact the same calls. The benefit of using that module is when you want to discover multiple services, or when you discovering on multiple servers automatically. It's pretty handy I would say.

Related