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

softdevice ble event handler not being called after connect

Hi...

I started with S130 demo example code. Added a custom services . The problem I am having now is that after I connect ble_evt_dispatch isn't being called.

I have registered for BLE events:

err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch); And then within ble_evt_dispatch I have:

ble_custom_on_ble_evt(&m_custom, p_ble_evt);

I am using Dynasream N5 development kit,S130 alpha v 0.9.0 and Keil v 5.14.0

Parents
  • @Sruthiraj: Which firmware did you use to test ?

    If it the default example provided in the S130 zipfile, we don't use interrupt driven approach but polling. We read the pending event using sd_ble_evt_get() inside event_handle(). And we call event_ handle when we expect an event.

    I would suggest you to have a look at this example where we use the normal approach that the event is pulled out when there is an interrupt from softdevice.

Reply
  • @Sruthiraj: Which firmware did you use to test ?

    If it the default example provided in the S130 zipfile, we don't use interrupt driven approach but polling. We read the pending event using sd_ble_evt_get() inside event_handle(). And we call event_ handle when we expect an event.

    I would suggest you to have a look at this example where we use the normal approach that the event is pulled out when there is an interrupt from softdevice.

Children
Related