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

Event for Service Discovery

I was wondering if it would be possible to add an event for Service Discovery (and other similar BLE stack events) that could be detected by user applications. Per answers such as here and here, it looks like that isn't enabled in the softdevice currently.

The application I'm working on uses the nRF51822 on a power-constrained device. It's very important to minimize current draw, both average and instantaneous. I use events for things like the start of a connection or read authorization as a trigger to temporarily stop other system functionality (such as UART transmissions) while BLE is dominating the power budget. It would be very useful to be able to detect when the softdevice is performing interactions such as Service Discovery in order to act upon that knowledge and limit my power use. Similarly, it would be helpful, although less necessary, to get events when those actions have completed.

As it is, my device occasionally overwhelms its power budget and crashes when a central performs Service Discovery.

Parents
  • I was about to post a similar question, albeit for my question what I need is to know when a Service Discovery has been completed.

    I realize I could do a blocking wait or a periodic check of the ble_db_discovery_t.discovery_in_progress. But blocking obviously block the code for who-know-how-long, and periodic check would waste a timer channel just for one purpose.

Reply
  • I was about to post a similar question, albeit for my question what I need is to know when a Service Discovery has been completed.

    I realize I could do a blocking wait or a periodic check of the ble_db_discovery_t.discovery_in_progress. But blocking obviously block the code for who-know-how-long, and periodic check would waste a timer channel just for one purpose.

Children
No Data
Related