Neo_WM620 WCDMA Module AT Command Set
Copyright © Neoway Technology Co., Ltd
76
12 TCP Server AT Commands
12.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
12.2 Setting TCP Listening for the Server: +TCPLISTEN
Description
To set the TCP listening function of the server, supporting three client links
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 link receives it.
1: Indicates that the data received is saved in the buffer and you can run
+IPNETREAD
to
read it when necessary.
<Socket>: SOCKET ID
Return
Value
<CR><LF>+TCPLISTEN:<socket>,OK<CR><LF>
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 links.
AT+TCPLISTEN=6800
Listening...
Transparent listening has been set.