Hello everyone,
We use WS6318 in device which acts as TCP client. Firmware version returned by ATI3 is L30.1_00gg.WS6318 140312.
I’ve stumbled upon a problem similar to described in this [url]https://forum.sierrawireless.com/t/ws-228-tcp-client-server-communication-issue/6108/1]. I cannot read data from socket after TCP connection is closed server-side:
// Bearer is OK
AT+WIPBR=4,6,0
OK
// Creating socket
AT+WIPCREATE=2,4,"time.nist.gov",13
OK
// To which NIST servers respond promptly by 51-byte string
+WIPREADY: 2,4
+WIPDATA: 2,4,51
+WIPPEERCLOSE: 2,4
OK
// But reading data fails
AT+WIPDATA=2,4,1
ERROR
If AT+WIPDATA call is done immediately after receiving +WIPREADY UR, but before +WIPDATA UR, everything is fine:
AT+WIPCREATE=2,5,"time.nist.gov",13
OK
+WIPREADY: 2,5
AT+WIPDATA=2,5,1
CONNECT
57072 15-02-19 09:15:08 00 0 0 665.2 UTC(NIST) *
SHUTDOWN
+WIPPEERCLOSE: 2,5
What might be cause of this? Am I missing something, or is this a feature/bug of firmware? In a topic mentioned above, Iotam has posted a code for WS228 that successfully reads data after socket was closed.
Thanks.