WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
109
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
+CME ERROR: 3
Set server listening before setting up
PPP connections.
AT+TCPLISTEN=6800
Listening...
Transparent listening has been set.
AT+TCPLISTEN=?
+TCPLISTEN: (1-65535),(0-1)
OK
Query the value range of the
listening port.
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
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.
+CLOSECLIENT:accept socket over
is returned if more than three clients are
connected.
Remarks
This command is valid only after a PPP connection is set up successfully.
Only the SIM cards with fixed IP addresses can be used as servers.
Parameter
<recv_mode>
is applicable to E9C33424 and later versions.
<recv_mode>
specified in this command controls the data receiving mode of
the connection set up by
Connect AcceptSocket
.
14.3 Closing the Listening Socket: +CLOSELISTEN
Description
To close the listening socket and the listened sockets on the client
Format
AT+CLOSELISTEN<CR>
Parameter
<Socket>: Socket number