Skip to content

Commit

Permalink
Bluetooth: L2CAP: Add initial implementation of ECRED mode
Browse files Browse the repository at this point in the history
This adds the initial implementation of ECRED mode which can connect up
to 5 channels simultaneously and is required by EATT.

Signed-off-by: Luiz Augusto von Dentz <[email protected]>
  • Loading branch information
Vudentz authored and jhedberg committed May 2, 2020
1 parent 72d4f06 commit f7586b0
Show file tree
Hide file tree
Showing 2 changed files with 506 additions and 49 deletions.
15 changes: 15 additions & 0 deletions include/bluetooth/l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,21 @@ int bt_l2cap_server_register(struct bt_l2cap_server *server);
*/
int bt_l2cap_br_server_register(struct bt_l2cap_server *server);

/** @brief Connect Enhanced Credit Based L2CAP channels
*
* Connect up to 5 L2CAP channels by PSM, once the connection is completed
* each channel connected() callback will be called. If the connection is
* rejected disconnected() callback is called instead.
*
* @param conn Connection object.
* @param chans Array of channel objects.
* @param psm Channel PSM to connect to.
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_l2cap_ecred_chan_connect(struct bt_conn *conn,
struct bt_l2cap_chan **chans, u16_t psm);

/** @brief Connect L2CAP channel
*
* Connect L2CAP channel by PSM, once the connection is completed channel
Expand Down
Loading

0 comments on commit f7586b0

Please sign in to comment.