If the device is paired (but not bonded) using "Just Works", sd_softdevice_disable() causes the application to hang/crash (nothing happens until reset by watchdog timer).
I use dfu_app_handler.c from sdk 8.1.0, so sd_softdevice_disable() is called from bootloader_start() when going from application to bootloader/DFU.
If pairing is not performed (using the exact same application) before writing START_DFU Op Code to the DFU Control Point characteristic, everything works as expected.
It should be fairly easy to recreate the issue. I use the following security parameters:
#define SEC_PARAM_TIMEOUT 10
#define SEC_PARAM_BOND 0
#define SEC_PARAM_MITM 0
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE
#define SEC_PARAM_OOB 0
#define SEC_PARAM_MIN_KEY_SIZE 7
#define SEC_PARAM_MAX_KEY_SIZE 16
And for the services I want encrypted I use:
BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM()
Any help would be greatly appreciated.