N11 V2
AT Command Manual
Copyright © Neoway Technology Co., Ltd
72
10 TCP Server AT Commands
10.1 Setting TCP Listening for the Server: +TCPLISTEN
Description
To set the TCP listening function of the server
Format
AT+TCPLISTEN=<port><CR>
AT+TCPLISTEN?<CR>
Parameter
<Port>: Port ID
<Socket>: Socket ID
Return Value
See the Example.
Example
AT+TCPLISTEN=6800
+TCPLISTEN: 0,OK
Listening port ID: 6800
The listening function of the server is started.
AT+TCPLISTEN=6800
+TCPLISTEN: bind error
Fails to bind
AT+TCPLISTEN=6800
Listening...
Transparent listening has been set.
AT+TCPLISTEN?
+TCPLISTEN: listening status
Query the listening status. Here the server is in
the listening status.
AT+TCPLISTEN?
+TCPLISTEN: not listening
Query the listening status. Here the server is
not in the listening status.
Connect
AcceptSocket=1,ClientAddr=119
.123.77.133,ClientPort=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.
Remarks
Activate the PPP before using this command.
Only the SIM cards with fixed IP addresses can be used as servers.