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

0x70 - BLE_L2CAP_EVT_RX

Event packet encoding

Frame format encoding of the BLE_L2CAP_EVT_RX packet.

Event ID = 0x70 for BLE_L2CAP_EVT_RX.

The BLE L2CAP event contains a connection handle. For the BLE L2CAP event RX, the ble_l2cap_evt_rx_t is encoded after the connection handle, as seen in Figure 1.

The order of the encoding is:

Length Parameter Value
2 bytes Connection Handle See ble_l2cap_evt_t::conn_handle
2 bytes Data Length See ble_l2cap_header_t::len
2 bytes CID See ble_l2cap_header_t::cid
0..'Data Length' bytes Data See ble_l2cap_evt_rx_t::data


Encoding of BLE L2CAP packet received event

l2cap_evt_rx.png
Figure 1: Encoding of BLE L2CAP packet received event.