AT Commands Reference Guide
80529ST10815A Rev.2– 2017-09-14
ReproductionforbiddenwithoutTelitCommunicationsS.p.A.writtenauthorization‐AllRightsReserved page167of233
Send UDP data to a specific remote host - #SSENDUDP
#SSENDUDP – send UDP data to a specific remote host
AT#SSENDUDP=
<connId>,
<remoteIP>,
<remotePort>
This command permits, while the module is in command mode, to send data over
UDP to a specific remote host.
UDP connection has to be previously completed with a first remote host through
#SLUDP / #SA.
Then, if we receive data from this or another host, we are able to send data to it.
Like command #SSEND, the device responds with ‘>‘ and waits for the data to
send.
Parameters:
<connId> - socket connection identifier 1..6
<remoteIP> - IP address of the remote host in dotted decimal notation,
string type: “xxx.xxx.xxx.xxx”
<remotePort> - remote host port 1..65535
Note: after SRING that indicates incoming UDP data and issuing #SRECV to
receive data itself, through #SS is possible to check last remote host (IP/Port).
Note: if successive resume of the socket to online mode
Is performed (#SO), connection with first remote host is restored as it was before.
AT#SSENDUDP=?
Test command reports the supported range of values for parameters <connId>,
<remoteIP> and <remotePort>.
Example
Starts listening on <LocPort>(previous setting of firewall through #FRWL has to be
done)
AT#SLUDP=1,1,<LocPort>
OK
SRING: 1 // UDP data from a remote host available
AT#SA=1,1
OK
SRING: 1
AT#SI=1
#SI: 1,0,0,23,0 // 23 bytes to read
OK
AT#SRECV=1,23
#SRECV:1,23
message from first host
OK
AT#SS=1
#SS: 1,2,<LocIP>,<LocPort>,<RemIP1>,<RemPort1>
OK