WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
108
14 TCP Server AT Commands
14.1 Obtaining the Local IP Address: +GETIP
Description
To query the local IP address
Format
AT+GETIP<CR>
Parameter
N/A
Return Value
+LOCALIP:<ip_addr>
Example
AT+GETIP
+LOCALIP: 119.139.220.13
OK
Query the local IP address.
AT+GETIP
+CME ERROR: 3
ERROR is returned because you query
the local IP address before PPP dialup.
Remarks
N/A
14.2 Setting TCP Listening for the Server: +TCPLISTEN
Description
To set the TCP listening function of the server, supporting three client connections
Format
AT+TCPLISTEN=<port>[,<recv_mode>]<CR>
AT+TCPLISTEN?<CR>
AT+TCPLISTEN=?<CR>
Parameter
<Port>: Port ID, ranging from 1 to 65535
<recv_mode>: Data receiving mode. The default value is 0.
0: Indicates that the data is output directly after the socket receives it.
1: Indicates that the data received is saved in the buffer and you can run
+IPNETREAD
to read it when necessary.
Return Value
<CR><LF>+TCPLISTEN:<socket>,OK<CR><LF>