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

SoftDevice does not call the registered callback

I am using the following code during stack initialization: // Register with the SoftDevice handler module for BLE events. err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);

On starting advertising, I can see my board on the nRF MCP app. I try to connect to the board using the MCP app, the app shows connected, I can also disconnect and connect again. In all this, the "ble_evet_dispatch" should be called but it never does! Could someone please help me reason why?

Parents
  • I am nordic employee and I have an NDA when you share information with me. So it is still ok to send me proprietary information. Ill send you pvt msg on more info. I am suspecting some thing is wrong in your proprietary code, so ripping it off might hide the problem.

    I would try to debug and step into the function softdevice_sys_evt_handler_set to see if the sys handler has been successfully set inside softdevice. And after that I will set a breakpoint in softdevice_handler.c: SOFTDEVICE_EVT_IRQHandler to see if this is getting called at all or not? if not then we should figure out if there are any other higher priority tasks in your proprietary protocol which is starving this task.

Reply
  • I am nordic employee and I have an NDA when you share information with me. So it is still ok to send me proprietary information. Ill send you pvt msg on more info. I am suspecting some thing is wrong in your proprietary code, so ripping it off might hide the problem.

    I would try to debug and step into the function softdevice_sys_evt_handler_set to see if the sys handler has been successfully set inside softdevice. And after that I will set a breakpoint in softdevice_handler.c: SOFTDEVICE_EVT_IRQHandler to see if this is getting called at all or not? if not then we should figure out if there are any other higher priority tasks in your proprietary protocol which is starving this task.

Children
No Data
Related