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

Handling BLE events with SDK 15.1

Hello all,

How does the handling of ble events work with SDK 15.1?
When I register more than one event handler with the macro NRF_SDH_BLE_OBSERVER(), how does the softdevice know which event handler should be called when an event occurs? Are alle event handlers called each time an event occurs?

Example:
In the NUS central example there are four different instances (NUS, GATT, DB_DISCOVERY and SCAN) which register ble events. How does the softdevice know when to call which event handler?

Thank you in advance,
Greentooth

Parents
  • Hi,

    With the macro NRF_SDH_BLE_OBSERVER you register an event handler that will get all BLE events. It is up to the event handler to decide whether the event is relevant. You will see that the various handlers act on different events, sometimes overlapping, but each handler operates only on "their own" part of the system so to say.

    Regards,
    Terje

Reply
  • Hi,

    With the macro NRF_SDH_BLE_OBSERVER you register an event handler that will get all BLE events. It is up to the event handler to decide whether the event is relevant. You will see that the various handlers act on different events, sometimes overlapping, but each handler operates only on "their own" part of the system so to say.

    Regards,
    Terje

Children
Related