ME310G1/ME910G1/ML865G1 AT Commands Reference Guide
80617ST10991A Rev.4 Page 392 of 545 2020-04-15
3.13.20. AT#SLASTCLOSURE - Detect the Cause of a Socket Disconnection
The command detects the cause of a socket disconnection.
AT#SLASTCLOSURE=<connId>
Execution command reports the socket disconnection cause.
Parameter:
socket connection identifier
socket connection identifier. conMax value is returned by test
command
The execution command reports the disconnection cause of the selected socket. The
format of the returned message is:
#SLASTCLOSURE: <connId>,<cause>
socket
disconnection
cause.
not available (socket has not yet been closed)
remote host TCP connection close due to FIN/END: normal
remote disconnection decided by the remote application
remote host TCP connection close due to RST, all other cases in
which the socket is aborted without indication from peer (for
instance because peer doesn't send ack after maximum number
of retransmissions/peer is no more alive). All these cases include
all the "FATAL" errors after recv or send on the TCP socket
(named as different from EWOULDBLOCK)
socket inactivity timeout
network deactivation (PDP context deactivation from network)
Any time socket is re-opened, last disconnection cause is reset. Command report 0 (not
available).
User closure cause (#SH) is not considered and if a user closure is performed after
remote disconnection, remote disconnection cause remains saved and is not overwritten.