2016-11-02 10:23 AM
Hi,
I've been testing the socket server (AT+S.SOCKD=32000) on the SPWF01SA and noticed that whenever a client connects the Wi-Fi module immediately enters data mode. This seemed like a potential problem so I decided to test it while waiting for the result from an AT command (HTTPGET).Interestingly, the message from the socket client is printed immediately on the UART (no WIND!) and the AT command does not complete until the socket client disconnects. After the socket client disconnects the response from the AT command is printed followed by four WINDs (61, 60, 59, 62).This behaviour makes it dangerous to have a socket server active while issuing any AT command.If a socket client has connected previously, I am able to enter and exit data mode (at+s.) with success. If there is incoming socket data during this time I properly get WIND 64 (pending data) and am able to receive it later (with at+s.).Example to reproduce (UI = UART Input, UO = UART Output, ♯ = PC Terminal). Also note HTTPGET must take e.g. 2 seconds to respond so there is time to issue telnet before response:UI: AT+S.SOCKD=32000\rUI: AT+S.HTTPGET=192.168.0.100,/test,8080♯: telnet 192.168.0.101 32000♯: telnet> hello from telnet♯: quit telnet (after e.g. 1 minute)UO: hello from telnet\r\nUO: HTTP/1.0 200 OK\r\nUO: Date: Wed, 02 Nov 2016 17:19:49 GMT\r\nUO: Content-Length: 15\r\nUO: Content-Type: text/plain; charset=utf-8\r\nUO: \r\nUO: hello from http\r\n\r\nUO: \r\nOK\r\nUO: \r\n+WIND:61:Incoming Socket Client:192.168.0.100\r\nUO: \r\n+WIND:60:Now in Data Mode\r\nUO: \r\n+WIND:59:Back to Command Mode\r\nUO: \r\n+WIND:62:Socket Client Gone:192.168.0.100\r\nAs you can see, the telnet hello is the first in the buffer, followed by HTTP response, then AT command status and finally delayed WIND.Is it possible to work around this issue in any way?PS. I'm running the latest firmware (160129-c5bf5ce). #spwf01sa-socket-sockd