S115 SoftDevice for nRF54LS05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_disconnect()

uint32_t sd_ble_gap_disconnect ( uint16_t conn_handle,
uint8_t hci_status_code )

#include <ble_gap.h>

Disconnect (GAP Link Termination).

This call initiates the disconnection procedure, and its completion will be communicated to the application with a BLE_GAP_EVT_DISCONNECTED event.

Events generated
BLE_GAP_EVT_DISCONNECTEDGenerated when disconnection procedure is complete.
Relevant Message Sequence Charts
Peripheral Connection Establishment and Termination
Parameters
[in]conn_handleConnection handle.
[in]hci_status_codeHCI status code, see Bluetooth status codes (accepted values are BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and BLE_HCI_CONN_INTERVAL_UNACCEPTABLE).
Return values
NRF_SUCCESSThe disconnection procedure has been started successfully.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle supplied.
NRF_ERROR_INVALID_STATEDisconnection in progress or link has not been established.