Use ESB and MPSL without Bluetooth

Hi,

I'm writing an application which, depending on configuration, will either use ESB and Bluetooth, or just ESB.

I read through the article ( Updating to the MPSL Timeslot interface ) describing how to use MPSL with ESB.

Using example code, I can receive MPSL timeslots, but not when Bluetooth is inactive.

Specifically, I only get callbacks when Bluetooth is either a) advertising or b) connected to a central.

I have limited knowledge of the underlying libraries, but I thought there was a SoftDevice in there somewhere managing Bluetooth and its interaction with MPSL.  Whatever is going on, it seems clear my ESB/MPSL code relies on something that isn't happening when Bluetooth isn't running.

I have tried running bt_init(NULL) to see if that would be sufficient, but it wasn't.  Possibly that doesn't actually lead to the radio, and hence MPSL, getting used/scheduled.

Can you tell me what I need to do to get this working?  Perhaps some way to activate MPSL outside of Bluetooth?

Ideally whatever the answer, I would be able to do, and then later in the code also turn on Bluetooth and have it work as well (switchable at runtime, like an ESB message is received, and that triggers starting bluetooth).

Thank you.

Related