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

Radio Notification Context

Hello,

I have a problem using the radio notifications. I use the softdevice V. 15.3.0.

I would like to have an interrupt every time I send an advertisement, which I can achieve using:

ble_radio_notification_init( 2, NRF_RADIO_NOTIFICATION_DISTANCE_800US, interrupt_func)

While this is working fine on its own, the interrupt is not only triggered by advertisements, but also from radio activities coming from a scanner which is running simultaneously. Is there a way to find out if the interrupt was triggered by advertisement or the scanner? Also if I could just get an interrupt when advertising this would be fine.

Best Regards,

Lukas

Edit: Wrong naming, mistaken advertisement and notification.

Parents Reply
  • Hey,

    After reading the post you sent me I think there was a misunderstanding. I would like to get an interrupt when sending an advertisement, not when sending a notification. I've mistaken the two terms, sorry for that. 

    So the actual question I had was if I can get an interrupt after an advertisement. And I could already do this with 

    ble_radio_notification_init(2, NRF_RADIO_NOTIFICATION_DISTANCE_2680US, interrupt_fun);

    But this interrupt also fires when doing a scan. So is there a way to only do this after advertising and not when performing a scan?

    Sorry for my mistake. 

Children
  • Hi,

    Oh well, I see.. The thing with using radio notifications is that it's totally agnostic over what happens on the higher layer, it only cares if the radio is Active or not. There isn't a specific event that is generated when the nRF are advertising. You can always do this indirectly by setting a flag once you've started advertising in the application, but it won't necessarily be precise as the Softdevice has to schedule the task i.e put in the queue and execute it. But it will in most cases work fine Slight smile

    regards

    Jared

  • Hey,

    after trying a bit around I decided to just stop the scanner for some short time and then send the advertisement which gives me the possibility to use the radio notifications.

    Thanks for your help

Related