beautypg.com

11 receive data in command mode - #srecv – Rainbow Electronics GM862-QUAD-PY User Manual

Page 324

background image




AT Commands Reference Guide

80000ST10025a Rev. 5 - 09/07/08

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 324 of 434

#SA - Socket Accept

SELINT 2

AT#SA=
[,]

Execution command accepts an incoming socket connection after an URC
SRING:

Parameter:
- socket connection identifier
1..6
- Connection mode, as for command #SD.
0 - online mode connection (default)
1 - command mode connection

Note: the SRING URC has to be a consequence of a #SL issue.

AT#SA=?

Test command reports the range of values for all the parameters.

3.5.7.3.11 Receive Data In Command Mode - #SRECV

#SRECV - Receive Data In Command Mode

SELINT 2

AT#SRECV=
,

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:
- socket connection identifier
1..6
- max number of bytes to read
1..1500

Note: issuing #SRECV when there’s no buffered data raises an error.

Example

SRING URC ( be 0, be 0) telling data
have just come through connected socket identified by
=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

SRING URC ( be 1, be 1) telling 15

bytes data have just come through connected socket
identified by =2 and are now buffered
SRING: 2,15