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

Receiving SoftDevice interrupt on sending advertisment

Hi everyone,

I'm trying to change the advertisement data while advertising using an interrupt. So far I've managed to use a button to change the advertisement data.

Now I'd like to know whether it is possible to get an interrupt from the SoftDevice just before / after sending an advertisement packet and make use of this interrupt with a handler. The idea is to use the clock of the SoftDevice to periodically change the advertisement data.

I'm using the PCA10040 board, SDK v15.0.0, and SoftDevice S132.

Best,

lhochstetter

Parents
  • FormerMember
    +1 FormerMember

    There are two different approaches that can be used update the advertising data for each advertising packet:

    1) Update based on the advertising interval: For a given advertising interval, advertising packets will be transmitted at that interval+- a random a short random time. Since the advertising interval is known, it should work to use app_timer to update the advertising data each advertising interval.

    2) Use radio notifications to indicate when the radio is being turned on and off. It has been discussed here.

  • Hi Kristin,

    thanks a lot! The second suggestion was what I was looking for. I had to adapt the corresponding armgcc Makefile (adding components\ble\ble_radio_notification\ble_radio_notification.{c|h} files) and added a missing #include "nrf_nvic.h" to ble_radio_notification.h and it worked just fine.

    Best,

    lhochstetter

Reply Children
No Data
Related