ble_app_lecb L2CAP app does not add credits to its own channel
ID: LPCBARESDK-1058
Status: Fixed
First reported: 6.0.22.1401
Fixed in: 6.0.24.1464
Description
The ble_app_lecb application 6.0.22.1401\projects\target_apps\misc\ble_app_lecb
demonstrates Bluetooth LE Credit-Based Flow Control for L2CAP Connection-Oriented Channels.
For more details about connected oriented channel, refer to BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 3, Part A page 1164.
Each L2CAP channel is bidirectional, meaning both devices can send and receive data. Each device has a receiving and sending side of the channel. Typically, a device adds credits to the channel to inform the peer device that it can send more data.
In the function user_app_lecb_add_ind, credits are not added directly by the application. Therefore, an explicit add credits command is needed at the system call level, as simply assigning the source credit is insufficient.
void user_app_lecb_add_ind(uint8_t conidx,
struct gapc_lecb_add_ind const *param)
{
user_lecb_conn.src_credits = param->src_credit;
user_lecb_conn.dest_credits = param->dest_credit;
}
Workaround
This is not considered a bug and does not affect the SDK functionality. Users should implement their own code to add credits to the application as needed.