1 Reply Latest reply on Oct 28, 2020 11:36 PM by SheetalJ_96

    CYW20819 BTSDK2.8 RFCOMM Flow contorol issue


      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)



      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.