
GSM Module
2.13
Server Commands
2.13.1
+ZTCPLISTEN: set port monitoring
Descriptio
n
This command is used to enable/disable port monitoring function.
Format
AT+ZTCPLISTEN=<on/off>,<portNum>
AT+ZTCPLISTEN
?
Paramete
r
On/off
1:start listening
2:stop listening
portNum
the listening port num
If <on/off> is 2, please set this parameter as 0.
AT+ZTCPLISTEN=1,1174
OK
Monitoring port 1174
at+ztcplisten?
+ZTCPLISTEN:1,1174
OK
Check monitoring status
AT+ZTCPLISTEN=2
,
0
OK
Stop monitoring
Format
+ZTCP(P): INCOMING CONNECT
ACCEPTED
Indicating one monitoring to one
external connection, and the
connection is accepted.
Note
1.
One port can be monitored currently, and only two connections are
allowed on each port;
2.
Prior to the monitoring, please firstly use AT+ZPPPOPEN to open the PPP link;
2.13.2
+ZTCPSENDP: send data through passively opened link
Description
This command is used to send data through (monitored) passively
opened link.
Format
AT+ZTCPSENDP=<channel>,<n>
Parameter
<channel>: the sign of connected client ends;
<n>: the length of data to send
Descriptions of
returned value
Input AT command according to the above format, press carriage
return to display “>”. In this case, you can input the data to transmit.
When inputting (size+1) data (it can be any data, 0x0d
60