AirM2M_ESP8266 WiFi module user manual V3.2
Shanghai AirM2M Communication Technology Co., Ltd
http://www.airm2m.com
Page 44
5.3.2 Get TCP/UDP connection mode
:
AT+CIPSTATUS
Syntax
:
command
type
grammar
Response
Execution
command
AT+CIPSTATUS
If it is single connection (AT+CIPMUX=0):
OK
STATE: <state>
C:<cid>, <TCP/UDP>, <Local IP address>,<Local port>,<Remote IP
address>, <Remote port>, <client state>
Note: If it is single connection, it uses the following way for connection:
AT+CIPSTART=<type>,<addr>,<port>,[local_port] way, and one link can
be set up only. The occupied <id> = 0
If it is mult connection (AT+CIPMUX=1):
OK
STATE:<state>
S: <sid>,<port>,<server state>
C:<cid>, <TCP/UDP>, <Local IP address>,<Local port>,<Remote IP
address>, <Remote port>, <client state>
Test
command
AT+CIPSTATUS=?
OK
parameter definition
:
parameter
definition
value
value instruction
<state>
single connection
state
IP INITIAL
initialization
IP STATUS
obtain local IP status
TCP
CONNECTING/UDP
CONNECTING
TCP connecting/UDP port registering
CONNECT OK
successfully connect setup
TCP CLOSING/UDP
CLOSING
Shutting down TCP connection, and
logging out UDP port.
<sid>
server ID
0~1
value 0 and 1
<server state>
server status
OPENING
turning on
LISTENING
monitoring
CLOSING
turning off
<cid>
customer’s ID
0~3
value as 0,1,2,3
<Local IP address>
local IP
<Local port>
local port
<Remote IP address>
remote IP
<Remote port>
remote port
<client state>
client status
INITIAL
turn off state
CONNECTING
connecting
CONNECTED
connected
Examples
: