This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE disconnect

I use below code to disconnect the BLE device from mobile phone. But it return err_code =7. Please comments.

            if(m_conn_handle!=BLE_CONN_HANDLE_INVALID)
                 {
                   LocalInitiateddDisconnect = true;
                    err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
                    APP_ERROR_CHECK(err_code);
                 }
Related