BLE_L2CAP_CbConnReq
C
uint16_t BLE_L2CAP_CbConnReq(uint16_t connHandle, uint16_t spsm);
Description
Issues a L2CAP credit-based connection request to establish an L2CAP channel.
Note
Before calling this API, BLE_L2CAP_CbRegisterSpsm must be called to register an SPSM.
Events generated
BLE_L2CAP_EVT_CB_CONN_IND is generated when a credit-based connection is successfully established. BLE_L2CAP_EVT_CB_CONN_FAIL_IND is generated when there is a failure to establish a credit-based connection.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Connection handle associated with this connection. |
[in] spsm | The SPSM (Simplified Protocol/Service Multiplexer) value. See the valid range L2CAP SPSM dynamic range. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully issued a connection request. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_NO_RESOURCE | No transmit buffers available for sending connection request. |