I would like to write code to disconnect from any connected device. My system is a ble peripheral with s132 6.0.0.
My code calls:
result=sd_ble_gap_disconnect(BLE_CONN_HANDLE_ALL,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
APP_ERROR_CHECK_BOOL(((result==NRF_SUCCESS)||(result==NRF_ERROR_INVALID_STATE)||(result==NRF_ERROR_SOFTDEVICE_NOT_ENABLED)));
However I'm getting an NRF_ERROR_INVALID_CONN_HANDLE response. Is this because I'm not connected to any device or does sd_ble_gap_disconnect not support BLE_CONN_HANDLE?