Other Parts Discussed in Thread: CC3220MODA
I am experimenting with the serial_wifi example which impliments an AT Command control of a serial to Wi-Fi interface.
On a CC3220MODA Launchpad I program the project into the target with JTAG and set up the device as a STA on our network with a socket. On a desktop computer, I use RealTerminal and send a file with a sequence of AT commands to set up the socket the same way every time. Our router DHCP server assigns the same IP address each time: 10.1.10.11 which is how I can used a file to hold the commands.
Here is my sequence of commands:
\\<at+close=0 #\\<AT+WlanDisconnect \\<at+stop=10 \\<at+start \\<at+socket=inet,stream,tcp \\<at+bind=0,inet,23,10.1.10.11 \\<at+listen=0,Listen \\<at+accept=0,inet
To give the CC3220 time to do it's work, I set RealTerminal for about 1 second delay at each new line.
Often, I then confirm that the Launchpad has connected to our network by pinging it from my desktop computer .
I then connect with RealTerminal. I send and received some data from both terminals and then closed the client.
Screen shot after close.
However, when I disconnect the client with RealTerm there is no indication on the CC3220 debug interface of the client disconnection.
Here I have a wireshark capture that shows RealTerminal sent the FIN message which I think closes the socket from the client end.
With out an event, how is the CC3220 server application to know if the client has disconnected?