3 Replies Latest reply on Jul 11, 2014 12:59 PM by randerson

    SN8200-SNIC-SPI-03-37191 binary - TCP flow control problems

      I'm not entirely sure that this is the right forum for this, because my question is only indirectly about WICED, but hopefully someone can assist.

       

      I've been working with a Murata SN8200 using the SPI binary, v3.37191.  The local host controller is an STM32F407, and the dev environment is Keil Pro.

       

      Much of it is working quite well: I can configure the SN8200 as a STA, connect to an AP and open (TCP) sockets for incoming and outgoing connections.  When I send small amounts of data everything works well, e.g. a Telnet session.  However, when I try to send a large amount of data from an external host into the SN8200 (in response to a request from an outgoing connection to send a file), I can't get TCP flow control to work.

       

      I use the SNIC_DATA_IND_ACK_CONFIG_REQ command to set the protocol, timeout and retry count; this responds as if it has worked, i.e. with SNIC_SUCCESS.

       

      When the incoming socket has data, it generates SNIC_CONNECTION_RECV_IND frames appropriately, but my response frame of SNIC_CONNECTION_RECV_CFM doesn't seem to work.  In the _CFM frame, I use the indication sequence number given by the SN8200 in the _IND frame.

       

      For more clarity, an example:

      ***Preconditions: link has been established to an AP, IP has been configured, SNIC has been initialised***

      1. Local host sends SNIC_DATA_IND_ACK_CONFIG_REQ with protocol=3,ack=1,timeout=10,retries=3

      2. SN8200 responds with SNIC_SUCCESS

      3. An outgoing TCP connection to a remote host is successfully established.

      4. Remote host sends a large amount of data.

      5. SN8200 sends SNIC_CONNECTION_RECV_IND, with first data segment.

      6. Local host responds with SNIC_CONNECTION_RECV_CFM.

      7. After 10ms, SN8200 sends SNIC_CONNECTION_RECV_IND, with first data segment.

      8. Local host responds with SNIC_CONNECTION_RECV_CFM.

      9. After 10ms, SN8200 sends SNIC_CONNECTION_RECV_IND, with first data segment.

      10. Local host responds with SNIC_CONNECTION_RECV_CFM.

      11. After 10ms, SN8200 sends SNIC_CONNECTION_RECV_IND, with second data segment.

      12. Local host responds with SNIC_CONNECTION_RECV_CFM.

      13. After 10ms, SN8200 sends SNIC_CONNECTION_RECV_IND, with second data segment.

      14. Local host responds with SNIC_CONNECTION_RECV_CFM.

      15. After 10ms, SN8200 sends SNIC_CONNECTION_RECV_IND, with second data segment.

      16. Local host responds with SNIC_CONNECTION_RECV_CFM.

      etc

       

      A troublesome side-effect is that in order to receive multiple data segments (without repeats), I have to set the retries to 1 and then wait the timeout between segments.  This massively throttles the throughput, because I can't process the frames fast enough to turn off flow control entirely.

       

      Any assistance would be greatly appreciated.