nRF51 SDK - S130 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BLE S130 L2CAP Functions

0xB0 - sd_ble_l2cap_cid_register

Function packet format

Frame format encoding of the sd_ble_l2cap_cid_register packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0xB0, see BLE_L2CAP_SVCS
2 bytesCID L2CAP CID


ble_l2cap_cid_un_register_packet.png
Figure 1: Packet format for sd_ble_l2cap_cid_register function.


Response packet format

Frame format encoding of the sd_ble_l2cap_cid_register response packet:

Length Parameter Value
1 byte Operation Code 0xB0, see BLE_L2CAP_SVCS
4 bytes nRF Error Code See sd_ble_l2cap_cid_register


default_response_packet_generic.png
Figure 2: Packet format for sd_ble_l2cap_cid_register response.


0xB1 - sd_ble_l2cap_cid_unregister

Function packet format

Frame format encoding of the sd_ble_l2cap_cid_unregister packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0xB1, see BLE_L2CAP_SVCS
2 bytesCID L2CAP CID


ble_l2cap_cid_un_register_packet.png
Figure 1: Packet format for sd_ble_l2cap_cid_unregister function.


Response packet format

Frame format encoding of the sd_ble_l2cap_cid_unregister response packet:

Length Parameter Value
1 byte Operation Code 0xB1, see BLE_L2CAP_SVCS
4 bytes nRF Error Code See sd_ble_l2cap_cid_unregister


default_response_packet_generic.png
Figure 2: Packet format for sd_ble_l2cap_cid_unregister response.


0xB2 - sd_ble_l2cap_tx

Function packet format

Frame format encoding of the sd_ble_l2cap_tx packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0xB2, see BLE_L2CAP_SVCS
2 bytes Connection Handle Handle value
1 byte L2CAP Header present 0x00 - not present, 0x01 - present
3 bytes Conditional: L2CAP Header See ble_l2cap_header_t
1 byte Data present 0x00 - not present, 0x01 - present
0...n bytesConditional: Data Data to be transmitted


As can also be seen inside Figure 1, the 3 bytes inside ble_l2cap_header_t are encoded as:

Length Parameter Value
2 bytesLength See ble_l2cap_header_t::len
2 bytesCID See ble_l2cap_header_t::cid


ble_l2cap_tx_packet.png
Figure 1: Packet format for sd_ble_l2cap_tx function.


Response packet format

Frame format encoding of the sd_ble_l2cap_tx response packet:

Length Parameter Value
1 byte Operation Code 0xB2, see BLE_L2CAP_SVCS
4 bytes nRF Error Code See sd_ble_l2cap_tx


default_response_packet_generic.png
Figure 2: Packet format for sd_ble_l2cap_tx response.