![Neoway M660 Скачать руководство пользователя страница 72](http://html.mh-extra.com/html/neoway/m660/m660_at-command-manual_1667874072.webp)
Neo_M660 AT Command Set
Copyright © Neoway Technology Co., Ltd
64
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
or
+TCPLISTEN:bind error
Listening port ID: 6800
The listening function of the server is
started.
Failed 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
Only the SIM cards with fixed IP addresses can be used as servers.
12.2 Closing the Listening Link: +CLOSELISTEN
Description
To close the listening connection
Format
AT+CLOSELISTEN<CR>
Parameter
N/A
Return
Value
See the Example.
Example
+CLOSELISTEN:0,local link closed
Abnormalities might occur on the network.
AT+CLOSELISTEN
+CLOSELISTEN:0,local link closed
The local link will be closed if there is any link
to the client.
AT+CLOSELISTEN
+CLOSELISTEN:Transparent local
link closed
This message is displayed in transparent
transmission mode.