Telit LE910 V2 Series AT Commands
80446ST10707A Rev. 0– 2015-11-03
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved page 346 of 509
Mod. 0808 2011-07 Rev.2
Receive Data In Command Mode - #SRECV
#SRECV - Receive Data In Command Mode
<connId>,
<maxByte>,[<UDPInf
o>]
Execution command permits the user to read data arrived through a connected socket,
but buffered and not yet read because the module entered command mode before
reading them; the module is notified of these data by a SRING URC, whose
presentation format depends on the last #SCFGEXT setting.
Parameters:
<connId> - socket connection identifier
1..6
<maxByte> - max number of bytes to read
1..1500
<UDPInfo>
0 – UDP information disabled ( default )
1 – UDP information enabled: data are read just until the end of the UDP datagram
and the response carries information about the remote IP address and port and about
the remaining bytes in the datagram.
AT#SRECV=<connId>,<maxBytes>,1
#SRECV: <sourceIP>,<sourcePort><connId>,<recData>,
<dataLeft>
data
Note: issuing #SRECV when there’s no buffered data raises an error.
Test command returns the range of supported values for parameters
< connId > < maxByte > and <UDPInfo>
SRING URC (<srMode> be 0, <dataMode> be 0)
telling data have just come through
connected socket identified by <connId>=1 and are now buffered
SRING: 1
Read in text format the buffered data
AT#SRECV=1,15
#SRECV: 1,15
stringa di test
OK
Or:
if the received datagram, received from <IPaddr and <IPport> is of 60 bytes
AT#SRECV=1,15,1
#SRECV: <IPaddr>,<IPport>,1,15,45
stringa di test
OK
SRING URC (<srMode> be 1, <dataMode> be 1) telling 15 bytes data have just come
through connected socket identified by <connId>=2 and are now buffered