Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
6 TCP Server AT Commands
6.1 Setting TCP Listening for the Server: +TCPLISTEN
To set the TCP listening function of the server
<CR><LF>+TCPLISTEN:<socket>,OK<CR><LF>
<Socket>:SOCKET ID, at most five sockets at one time
+TCPLISTEN:0,OK
or
+TCPLISTEN:bind error
The listening function of the server is
started.
Failed to bind
Transparent listening has been set.
+TCPLISTEN:listening status
Query the listening status. Here the
server is in the listening status.
Query the listening status. Here the
server is not in the listening status.
Connect
AcceptSocket=1,ClientAddr=119.123.77.133,C
lientPort=8000
Receive the connection request from
the client.
AcceptSocket
indicates the
socket ID on the module, and
119.123.77.133
is the IP address of the
client.
Activate the PPP before using this command.
Only the SIM cards with fixed IP addresses can be used as servers.
6.2 Closing the Listening Connection: +CLOSELISTEN
To close the listening connection and close all connections
<CR><LF>+CLOSELISTEN:<socket>,local link closed<CR><LF>
+CLOSECLIENT:1,remote link closed
The local link will be closed if there is any
connection to the client.