Go to the documentation of this file.
49 #ifndef __BLE_L2CAP_H__
50 #define __BLE_L2CAP_H__
145 uint16_t local_cid[5];
164 uint16_t peer_cid[5];
165 uint16_t local_cid[5];
176 uint16_t local_cid[5];
245 uint16_t peer_cid[5];
258 uint16_t local_cid[5];
267 uint16_t local_cid[5];
uint16_t peer_cid
It represents the channel endpoint on the device sending the request and receiving the response.
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity sending the LE Credit Based...
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the enha...
uint16_t peer_added_credits
Represent number of credits the receiving device can increment.
uint8_t index
Index of connection.
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the LE C...
The parameter of LE credit based connection request packet sending.
uint16_t local_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity of local device can rec...
Reconfig LE enhanced credit based connection parameter.
L2cap Connect Request event for BLE_L2CAP_EVT_ENH_CONN_REQ.
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity sending the LE Credit Based...
uint16_t le_psm
The le_psm number.
LE flow control credit packet parameter.
L2cap Credits Add Completed event for BLE_L2CAP_EVT_ADD_CREDITS_CPLT.
uint16_t local_cid
Local CID.
uint16_t local_credits
It indicates the number of LE-frames that the local device can receive.
@ BLE_L2CAP_REMOTE_USER_TERM_CON
Remote user terminates the connection.
bool accept
Whether to accept the enhanced lecb connection request.
uint16_t local_credits
It indicates the number of LE-frames that the local device can receive.
ble_l2cap_evt_enh_conn_ind_t enh_conn_ind
Key Missing event.
uint16_t cid
The local source channel.
uint16_t length
The lenght of data.
uint16_t peer_mps
It indicates the maximum payload size (in octets)that the peer device can receive.
uint16_t le_psm
Le_psm number that should be registered by local device.
uint16_t peer_credits
It indicates the number of LE-frames that the peer device can receive.
uint16_t le_psm
Le_psm number, it should be registered by local device.
ble_l2cap_evt_disconnect_t disconnected
Key Missing event.
BLE L2CAP event structure.
uint16_t local_cid
The local source channel ID.
uint16_t chl_num
It specifies the number of channel need to reconfigure, it shall not greater than 5.
uint16_t length
The lenght of data.
uint16_t ble_l2cap_lecb_sdu_send(uint8_t conn_idx, const ble_l2cap_lecb_sdu_t *p_sdu)
Send an SDU packet to the peer device.
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity sending the enhanced LE Cre...
uint16_t ble_l2cap_lecb_disconnect(uint8_t conn_idx, uint16_t local_cid)
Disconnect the LE credit based connection.
uint16_t credits
The credits is 0 if this packet is being sent, otherwise it represents the number of credits consumed...
uint16_t le_psm
Le_psm number.
The parameter of LE enhanced credit based connection request packet sending.
uint16_t local_cid
The local CID.
Define the chip configuration.
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the resp...
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity of peer device can receive ...
uint16_t chl_num
It specifies the number of channel need to reconfigure, it shall not greater than 5.
LE enhanced credit based connection confirm parameter.
uint16_t local_cid
The local source channel ID.
uint16_t le_psm
Le_psm number.
uint16_t chl_num
It specifies the number of channel need to reconfigure, it shall not greater than 5.
ble_l2cap_evt_sdu_send_t sdu_send
Link Encrypted event.
uint16_t ble_l2cap_enh_lecb_conn_create(uint8_t conn_idx, const ble_l2cap_enh_lecb_conn_req_t *p_enh_conn_req)
Create the LE enhanced credit based connection.
@ BLE_L2CAP_LOCAL_USER_TERM_CON
Local user terminates the connection.
uint16_t ble_l2cap_lecb_conn_create(uint8_t conn_idx, const ble_l2cap_lecb_conn_req_t *p_conn_req)
Create the LE credit based connection.
uint16_t local_cid
The local source channel ID.
uint16_t chl_num
The chl_num field specifies the number of channel created.
ble_l2cap_evt_add_credits_cplt_t add_credits_cplt
Key Press Notify event.
ble_l2cap_evt_sdu_recv_t sdu_recv
Link Encrypte Request event.
File that contains error codes.
L2cap SDU Send event for BLE_L2CAP_EVT_SDU_SEND.
uint16_t credits
Number of credits that the receiving device can increment.
uint16_t cid
The local source channel.
ble_l2cap_lecb_disconn_reason_t
LE credit based disconnection reasons.
L2cap Enhanced Connected Indicate event for BLE_L2CAP_EVT_ENH_CONN_IND.
ble_l2cap_evt_enh_reconfig_ind_t enh_reconfig_ind
Key Missing event.
uint16_t peer_credits
It indicates the number of F-frames that the peer device can.
L2cap Reconfig Enhanced credit Indicate event for BLE_L2CAP_EVT_ENH_RECONFIG_IND.
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
ble_l2cap_evt_enh_conn_req_t enh_conn_req
Key Missing event.
bool accept
Whether to accept the connection request.
L2cap Credits Add Indicate event for BLE_L2CAP_EVT_ADD_CREDITS_IND.
uint16_t chl_num
The chl_num field specifies the number of channel created.
uint16_t ble_l2cap_lecb_conn_cfm(uint8_t conn_idx, const ble_l2cap_lecb_cfm_conn_t *p_cfm_conn)
Confirm the LE credit based connection after receiving the connection request packet from the peer de...
ble_l2cap_evt_add_credits_ind_t add_credits_ind
Key Press Notify event.
uint16_t local_cid
Channel ID that is the local CID.
uint16_t peer_cid
It represents the channel endpoint on the device sending the request and receiving the response.
uint16_t peer_mtu
It indicates the maximum SDU size (in octets) that the peer device can receive.
uint16_t ble_l2cap_enh_lecb_reconfig(uint8_t conn_idx, const ble_l2cap_enh_lecb_reconfig_t *p_enh_reconfig)
Reconfig the mtu and mps for the indicated channels.
uint8_t * data
The data of this sdu packet.
L2cap Connected Indicate event for BLE_L2CAP_EVT_CONN_IND.
L2cap Enhanced Connect Request event for BLE_L2CAP_EVT_ENH_CONN_REQ.
uint16_t local_mtu
It indicates the maximum SDU size (in octets) that the L2CAP layer entity of local device can receive...
ble_l2cap_evt_conn_req_t conn_req
Link Encrypte Request event.
ble_l2cap_evt_conn_ind_t conn_ind
Link Encrypted event.
uint16_t le_psm
The le_psm number.
uint16_t ble_l2cap_lecb_credits_add(uint8_t conn_idx, const ble_l2cap_lecb_add_credits_t *p_add_credits)
Send a LE Flow Control Credit packet when the device is capable of receiving additional LE-frames (fo...
uint16_t chl_num
It indicates the number of channel created.
uint16_t local_credits
It indicates the number of LE-frames that the peer device can send to the L2CAP layer entity sending ...
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity of peer device can rece...
uint16_t credits
The credits is 0 if this packet is being sent, otherwise it represents the number of credits consumed...
uint16_t ble_l2cap_enh_lecb_conn_cfm(uint8_t conn_idx, const ble_l2cap_enh_lecb_cfm_conn_t *p_enh_cfm_conn)
Confirm the LE enhanced credit based connection after receiving the connection request packet from th...
uint16_t local_credits
The local credits indicate the number of LE-frames that the peer device can send to the L2CAP layer e...
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
L2cap SDU Receive event for BLE_L2CAP_EVT_SDU_RECV.
LE credit based connection confirm parameter.
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity sending the enhanced LE...
uint16_t mtu
The MTU field specifies the maximum SDU size (in octets) that the L2CAP layer entity sending the LE C...
L2cap disconnect event for BLE_L2CAP_EVT_DISCONNECTED.
uint16_t mps
The MPS field specifies the maximum payload size (in octets) that the L2CAP layer entity sending the ...
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity sending the LE Credit B...
ble_l2cap_lecb_disconn_reason_t reason
The reason for disconnection, see ble_l2cap_lecb_disconn_reason_t .
uint16_t local_cid
The local source channel ID.
uint16_t cid
Channel ID that is the local CID.
uint16_t local_credits
The local_credits field specifies the number of F-frames that the peer device can send to the L2CAP l...
uint16_t credits
Number of peer credit used.
uint8_t * data
The data of this sdu packet.
uint8_t status
0 success, otherwise failed.
uint16_t local_credits
The local credits, it indicates the number of F-frames that the peer device can send to the L2CAP lay...
uint16_t peer_mps
It indicates the maximum payload size (in octets) that the L2CAP layer entity sending the LE Credit B...