Hi,
I'm using a lightly modified copy of the Multilink central S120 example code. When I get to ble_stack_init()
the first thing it does is SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
Unfortunately that gives me an error code of 4097 which is BLE_ERROR_NOT_ENABLED
. The comment for that error says "sd_ble_enable has not been called". But in the example code sd_ble_enable()
is after SOFTDEVICE_HANDLER_INIT()
so of course it hasn't been called!
If I believe the error and move sd_ble_enable()
before SOFTDEVICE_HANDLER_INIT()
then sd_ble_enable()
returns error code 2, which is NRF_ERROR_SOFTDEVICE_NOT_ENABLED
!
What is going on here? Which one should go first, and why are there error codes for both of them not being called first?