Using Nordic's SOFTDEVICE in Mbed 5.15

Hi everyone,

I’m trying to use the Nordic BLE Softdevice in Mbed 5.15 on my NRF52840 dev kit. My app runs just fine in Mbed 5.11, but when I try the same thing on Mbed 5.15 (and also Mbed 5.13) the app does not run.

Here’s a patch/diff of the targets.json file for the MCU_NRF52840 target:

M targets/targets.json
@@ -7818,10 +7818,9 @@
             "NRF5x",
             "NRF52",
             "SDK_15_0",
-            "CORDIO",
-            "CORDIO_LL",
-            "SOFTDEVICE_NONE",
-            "NORDIC_CORDIO"
+            "NORDIC_SOFTDEVICE",
+            "SOFTDEVICE_COMMON",
+            "SOFTDEVICE_S140_FULL"

As you can see, I haven’t changed much at all. My app compiles in 5.15, but once the board is flashed with the image, the board immediately halts (LEDs turn on, but do not blink as expected). I’m assuming I’m missing some additional configuration to use the Softdevice again, but I have no idea where to look/what to do.

Can anyone help me re-enable the Softdevice in Mbed 5.15?

After some more testing, I found out the following:

With the Mbed BLE examples from github, I can use the SoftDevice with the deprecated examples, but not with the non-deprecated versions.

Now I guess the question is what is different between the two? I can see the non-deprecated version uses the ble::Gap::EventHandler class and the deprecated version does not; I need to look into what’s happening under the hood with the EventHandler class to see how the code compares to the deprecated example’s code.

2 Likes

Hello,

I’m also interested in the same thing. I would like to use soft device but the new Mbed BLE API.

bump

The Mbed team dropped support for SOFTDEVICE in Mbed OS in 5.15 for a number of reasons. It will not officially be added back in. I’m afraid anyone wanting to use SOFTDEVICE with a later version of Mbed OS will need to attempt the work themselves, however this is unlikely to be an easy task unfortunately.

If the Mbed team would at least support CORDIO properly after dropping the SOFTDEVICE it would be a first step. But the priority seems to be quite low.
Dropping the Softdevice and the CORDIO bug have it’s 3rd anniversary in a few Months: BLE power consumption using CORDIO stack too high · Issue #10669 · ARMmbed/mbed-os · GitHub.
It is one of the reasons some people try desperately to get mbed running with the softdevice.
I know it is hard to get it working and have contributed to a solution but it is still not officially available and hurting a lot of customers. Many have given up and switched to a different OS.
If you think about mbed with a Nordic device and want battery powered BLE I suggest you look elsewhere.

1 Like