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

sd_radio_notification_cfg_set no longer usable with SD in SDK 14

Hi,

I've been trying to update Espruino (github.com/.../Espruino) from using SDK 12 to SDK 14, which is proving to be a pretty horrific task.

The latest issue I've hit is that I was using radio notifications for:

  • Pumping data out using a Nordic UART service (there appears to be no easy 'data sent' callback). I was advised to use radio notifications by Nordic previously to work around this.
  • Alternating between advertising a series of different advertising packets (this feature wasn't just used for Eddystone) - this approach was taken from a Nordic Eddystone example app I believe

However I now get NRF_ERROR_INVALID_STATE from sd_radio_notification_cfg_set (because I guess the SoftDevice is running), when it worked fine in SDK 12.

Any idea how I can get these two things working again with the new Nordic SDK? The Eddystone library appears to use app_timer to guess when an advertisement will have been sent and to then update - but surely there's a better way?

Just to add to this: I can use BLE_GATTS_EVT_HVN_TX_COMPLETE to push new writes out after the first - however I'm pushing writes from a character device. If I start the first write when I receive a character then I'll always end up pushing the first write with only one character in it, which will make the console interface seem quite laggy. Before, using the radio_notification, I could figure out whether I needed to send anything right before it was to be sent, and make sure that I sent a full buffer of characters if I had them ready.

Related