WS6318, WIPDATA error after server had closed the socket

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.

hi,
It is working fine with FW version R32. Could you check at your end also?
Seems some issue with the FW version L30.

Regards,
Alex

Hi, Alex

Thanks for your reply, it appears you’re absolutely correct.

I kicked myself for not studying release notes for L30/R32 versions of firmware. R32 lists, among validated corrections, the following:

ID: 64758
Description: The AirPrime could not reopen a closed TCP socket by AT+WIPDATA.

So it is definitely a firmware bug that persisted until R32 and obviously affects L30.

Which speaks some about embedded software development in Sierra Wireless, but little could be done about that.