This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

L2CAP Flow Control Question

TI team,

When is the API_RESULT appl_spp_l2cap_tx_queue_flow_cb() called? Is it called every time the BT_SPP_send is used? Could you provide the different scenarios that would invoke appl_spp_l2cap_tx_queue_flow_cb()?

Regards,

  • The l2cap layer maintains a high and low watermark for its internal buffers,

    If a callback is registered by the application via the l2cap_register_tx_flow_cb() then this registered callback is called when one of these watermarks are hit, i.e when the available buffers fall below the low watermark or when the available buffers become more than the high watermark.

    The callback is called with the value of the current flow state (ON or OFF), when flow is OFF the application should stop sending more data (if reliable data transfer is expected) and wait for the callback to be called again with Flow = ON.

    Applications that require reliable data transfer should register for and check the flow state and regulate the sending of data via BT_SPP_send.