nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
0x66 - sd_ble_gap_disconnect

Function packet format

Frame format encoding of the sd_ble_gap_disconnect packet.

Operation Code = 0x66 (102) for sd_ble_gap_disconnect, see BLE_GAP_SVCS.

The parameters provided as input to sd_ble_gap_disconnect is encoded in the following order:

- 1 byte: Operation Code, Value = 0x66 (102)
- 2 bytes: Connection Handle
- 1 byte:Bluetooth status codes HCI status code


disconnect_packet.png
Figure 1: Packet format for sd_ble_gap_disconnect function.

Response packet format

Frame format encoding of the sd_ble_gap_disconnect response packet.

In case of an error, the following data is encoded:

- 1 byte:Operation Code, Value = 0x66 (102)
- 4 byte:nRF Error Code


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gap_disconnect error response.

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS, the following data is encoded:

- 1 byte: Operation Code, Value = 0x66 (102)
- 4 bytes:nRF Error Code


default_success_response_packet.png
Figure 3: Packet format for sd_ble_gap_disconnect success response.