CYW20819 BTSDK2.8 RFCOMM Flow contorol issue

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ToKo_4602001
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

I have written the code for SPP with flow control functionality by using following API.

  wiced_bt_rfcomm_flow_control(handle, WICED_FALSE);   //STOP

  wiced_bt_rfcomm_flow_control(handle, WICED_TRUE):    //RESTART

After data transfer (High load), I am faced with strange phenomenon that one or two packets stay in BTSDK stack.

For example

Sent Data
Received Data [rx_data_callback]
ABC******(Old Packet)
DEF******(Old Packet)
123ABC
ZZZDEF

In this case, if I issue wiced_bt_rfcomm_flow_control(handle, WICED_TRUE), data will be received.

Sent DataReceived Data [rx_data_callback]
ABC******(Old Packet)
DEF******(Old Packet)
<<<wiced_bt_rfcomm_flow_control(handle, WICED_TRUE)>>>ABC
<<<wiced_bt_rfcomm_flow_control(handle, WICED_TRUE)>>>DEF

I assume that BTSDK(stack) might have some kind of problems related to flow control and RFCOMM queue.

As work around, I issue three wiced_bt_rfcomm_flow_control(handle, WICED_TRUE) for one wiced_bt_rfcomm_flow_control(handle, WICED_FALSE).

By this code, all data can be received however I don't know it is proper work around.

Regards,

0 Likes
1 Reply
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi ToKo_4602001​,

Can you please provide your code so that I can test & verify?

Also, have you checked How can I use puart hw flow control??

0 Likes