Is there any sample App that shows how to use the WICED L2CAP APIs directly?
Based on the WICED-Studio 22.214.171.124, refers to the Bluetooth L2CAP Application Programming Interface, I want to register a new dynamic PSM, then establish a BT and LE L2CAP connection for data transferring and receiving directly.
I tried to registered same BT PSM in two devices, then try to send BT or LE L2CAP connect request to the device, but the connect request always failed or there is no response or later events at all.
For BT L2CAP connection, after register the new PSM successfully, call to wiced_bt_l2cap_connect_req() always return successfully also with a CID, but after this call, no response or events will come in both devices. It seems that the API takes no effect at all.
For LE L2CAP connection, call to wiced_bt_l2cap_le_register() to register a new LE PSM always failed, and the return value is always 0. I tried the input PSM value such as 0x0001~0x0080 and 0x0080~0x00FF, but no success at all.
So could anyone help indicate how to use the L2CAP APIs to register PSMs, create L2CAP connections and transfer and receive data. It's much more appreciated If there is a sample code.
You have mentioned that wiced_bt_l2cap_connect_req() is returning successful. Can you please let me know what is on the other side?
The peer is also WICED chip ? Are you sending the wiced_bt_l2cap_le_connect_rsp from the peer side??
Yes, the peer device is also WICED CYW20791-B1 chip.
When one device executed the wiced_bt_l2cap_connect_req() API, there was no event or action triggered or received on the peer device site, so don't know when and what to do in the next step. Such as when to to send the connection response.
If there is a working sample code app, it will help a lot.