This group includes all L2CAP layer APIs.
Functions | |
at_ble_status_t | at_ble_lecb_add_credit (at_ble_handle_t conn_handle, uint16_t le_psm, uint16_t credit) |
Inform peer device that local device can receive more packets, this is a blocking API. More... | |
at_ble_status_t | at_ble_lecb_cfm (at_ble_handle_t conn_handle, uint16_t le_psm, at_ble_lecb_status status) |
Server confirms if a credit based connection is completed successfully. More... | |
at_ble_status_t | at_ble_lecb_connect (at_ble_handle_t conn_handle, uint16_t le_psm, uint16_t cid, uint16_t intial_credit) |
Initiate a credit based connection. More... | |
at_ble_status_t | at_ble_lecb_create (at_ble_handle_t conn_handle, at_ble_lecb_sec_level_t sec_level, uint16_t le_psm, uint16_t cid, uint16_t initial_credit) |
Initialize a credit based channel to receive a credit based connection request, this API is blocking. More... | |
at_ble_status_t | at_ble_lecb_destroy (at_ble_handle_t conn_handle, uint16_t le_psm) |
Close an initialized credit based channel, this API is blocking. More... | |
at_ble_status_t | at_ble_lecb_disconnect (at_ble_handle_t conn_handle, uint16_t le_psm) |
Terminate a credit based connection. More... | |
at_ble_status_t | at_ble_lecb_send (at_ble_handle_t conn_handle, uint16_t cid, uint16_t len, uint8_t *data) |
Send data. More... | |
at_ble_status_t at_ble_lecb_add_credit | ( | at_ble_handle_t | conn_handle, |
uint16_t | le_psm, | ||
uint16_t | credit | ||
) |
Inform peer device that local device can receive more packets, this is a blocking API.
When a local device increments its credit it notifies the peer device that it's able to receive more packets (for example after it has finished processing one or more packets) , the peer device receives an AT_BLE_LECB_ADD_CREDIT_IND event.
[in] | conn_handle | handle of the connection |
[in] | le_psm | LE Protocol/Service Multiplexer |
[in] | credit | RX credit |
Referenced by l2cap_data_recv().
at_ble_status_t at_ble_lecb_cfm | ( | at_ble_handle_t | conn_handle, |
uint16_t | le_psm, | ||
at_ble_lecb_status | status | ||
) |
Server confirms if a credit based connection is completed successfully.
Server accepts or rejects an incoming credit based connection request , this API should be used when a connection request is received AT_BLE_LECB_CONN_REQ
[in] | conn_handle | handle of the connection |
[in] | le_psm | LE Protocol/Service Multiplexer |
[in] | status | status of operation refer to at_ble_lecb_status |
Referenced by l2cap_conn_req().
at_ble_status_t at_ble_lecb_connect | ( | at_ble_handle_t | conn_handle, |
uint16_t | le_psm, | ||
uint16_t | cid, | ||
uint16_t | intial_credit | ||
) |
Initiate a credit based connection.
Client initiates a credit based connection procedure to a server on a specific channel, in response AT_BLE_LECB_CONNECTED should be received indicating successful or failed connection
[in] | conn_handle | handle of the connection |
[in] | le_psm | LE Protocol/Service Multiplexer |
[in] | cid | channel id |
[in] | intial_credit | initial credit allocated for the LE credit based connection |
at_ble_status_t at_ble_lecb_create | ( | at_ble_handle_t | conn_handle, |
at_ble_lecb_sec_level_t | sec_level, | ||
uint16_t | le_psm, | ||
uint16_t | cid, | ||
uint16_t | initial_credit | ||
) |
Initialize a credit based channel to receive a credit based connection request, this API is blocking.
Server opens a channel to receive credit based connection requests
[in] | conn_handle | handle of the connection |
[in] | sec_level | security level refer to at_ble_lecb_sec_level_t |
[in] | le_psm | LE protocol/service multiplexer, valid dynamic range falls between 0x80 - 0xFF or a fixed SIG assigned psm may be used between 0x00-0x7F |
[in] | cid | channel id should be in the range of dynamically allocated channels 0x40 - 0x7F |
[in] | initial_credit | initial credit allocated for the LE credit based connection |
Referenced by ble_l2cap_connected().
at_ble_status_t at_ble_lecb_destroy | ( | at_ble_handle_t | conn_handle, |
uint16_t | le_psm | ||
) |
Close an initialized credit based channel, this API is blocking.
Server destroys an already initialized credit based channel
[in] | conn_handle | handle of the connection |
[in] | le_psm | LE protocol/service multiplexer |
Referenced by ble_l2cap_disconnected(), and l2cap_disconnect().
at_ble_status_t at_ble_lecb_disconnect | ( | at_ble_handle_t | conn_handle, |
uint16_t | le_psm | ||
) |
Terminate a credit based connection.
Server or client disconnects a credit based link, in response event AT_BLE_LECB_DISCONNECTED should be received
[in] | conn_handle | handle of the connection |
[in] | le_psm | LE Protocol/Service Multiplexer |
at_ble_status_t at_ble_lecb_send | ( | at_ble_handle_t | conn_handle, |
uint16_t | cid, | ||
uint16_t | len, | ||
uint8_t * | data | ||
) |
Send data.
Sends a data packet to peer with length less than AT_BLE_LECB_MAX_PKT_SIZE, in response AT_BLE_LECB_SEND_RESP should be received indicating a free available buffer to send. On the other side the receiving device gets an AT_BLE_LECB_DATA_RECIEVED event.
[in] | conn_handle | handle of the connection |
[in] | cid | channel id |
[in] | len | data length |
[in] | data | data pointer |
Referenced by at_app_send_lecb().