AT Commands Reference Guide
80529ST10815A Rev.2– 2017-09-14
ReproductionforbiddenwithoutTelitCommunicationsS.p.A.writtenauthorization‐AllRightsReserved page163of233
#SL - Socket Listen
port, if the sender is not filtered by internal firewall (see #FRWL), an URC is
received:
+SRING : <connId>
Afterwards we can use #SA to accept the connection or #SH to refuse it.
If the ListenAutoRsp flag has been set, then, when a TCP connection request
comes on the input port, if the sender is not filtered by the internal firewall (see
command #FRWL), the connection is automatically accepted: the CONNECT
indication is given and the modem goes into online data mode.
If the socket is closed by the network the following URC is received:
#SKTL: ABORTED
AT#SL?
Read command returns all the actual listening TCP sockets.
AT#SL=?
Test command returns the range of supported values for all the subparameters.
Example
Next command opens a socket listening for TCP on port 3500 without.
AT#SL=1,1,3500
OK
Detect the Cause of a Socket disconnection - #SLASTCLOSURE
#SLASTCLOSURE – Detect the cause of a socket disconnection
AT#SLASTCLOSUR
E=[<connId>]
Execution command reports socket disconnection cause.
Parameters:
<connId> - socket connection identifier 1..6
The response format is:
#SLASTCLOSURE: <connId>,<cause>
where:
<connId> - socket connection identifier, as before
<cause> - socket disconnection cause:
0 – not available(socket has not yet been closed)
1.- remote host TCP connection close due to FIN/END: normal remote
disconnection decided by the remote application
2 -.remote host TCP connection close due to RST, all others 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)
3.- socket inactivity timeout