MPSL radio notification API: why dropped?

Hello,

is there any technical reason why the MPSL radio notification API has been dropped somewhere before NCS 2.6?

Our application needs information about radio notifications as in the old "nRF SDK", because we have to collect radio on times for modelling power consumption and also to put the main application to sleep during radio on.

So how to do it without the dropped API?  Any Zephyr API I missed?

Thanks & regards

Hardy

PS: I know this "connection event trigger" sample, but this unfortunately does not offer enough functionality

Parents
  • Hi,

    The radio notification feature in MPSL was not much used and there were some techinical reasons to remove it (related to internals in MPSL). Threfore it was dropped in 2.6.

    As you write, connectino event trigger is provided as an alternative, but it is not exactly equivalent, and does not cover all use cases. To get notification of all radio activity you can hook up to radio events using PPI and the EGU, as described in this post. This will not give you warning in advance like you got with the old radio notifications, though.

  • Ok... thanks.

    So the rough sketch is to route some radio events onto an EGU, right?  Which are the actual events to use?

    Another point: how do you find out, if a feature is being used or not?  Because I doubt, that the notification feature had been used rarely, for us e.g. this was an important feature of the old SDK.

  • Hi,

    We don't have exact data on how much specific features are used, but we know what topics are discussed with sales and support. That said, we know that radio notification was used and we are workgin on providing alternatives (starting with the connection event trigger in 2.6). 

    Regardign events, I suggest you look at EVENTS_READY which you will get every time the radio is ready to start an Rx or Tx operation, and EVENTS_DISABLED which you get when the radio has been disabled.

  • Thanks for the suggestion.  I will check this next week (long weekend yet) and post results.

Reply Children
  • Ok... this seems to work better for my use case.  Init code is as follows:


    But per connection event there are now a lot of equ_handler() calls, also the handler has to find out which of the events are advertisements or data.  So still some work to do ;-)

    Currently the configuration also relies on EGU0.  Any suggestion how to do this nicer with devicetree?

  • Hi,

    This looks very sensible.

    If you want to, you could describe the EGU instance in the device tree and parse the devicetree in the code that sets the EGU instance here using something like DEVICE_DT_GET(DT_NODELABEL((my_egu)), but I don't think you can do much more from the devicetree in this case.