AirM2M_ESP8266 WiFi module user manual V3.2
Shanghai AirM2M Communication Technology Co., Ltd
http://www.airm2m.com
Page 51
parameter definition
:
parameter
definition
value
value instruction
<mode>
WIFI mode
1
Station
2
AP
<ip_addr>
Set IP address
The format is xx.xx.xx.xx
<netmask>
net mask
The format is xx.xx.xx.xx
<gateway>
gateway
The format is xx.xx.xx.xx
<sta_IP address>
IP address in STA mode
The format is xx.xx.xx.xx
<ap_IP address>
IP address in AP mode
The format is xx.xx.xx.xx
Examples
:
cmd(->)/
Resp(<-)
example
Decription
and
instruction
→
AT+CIFSR
Query the current IP
←
192.168.1.160
192.168.4.1
OK
192.168.1.160--STA IP
192.168.4.1--AP IP
→
AT+CIFSR=1,”192.168.1.161”,”255.255.255.0”,”192.168.1.1”
Set the STA IP
←
OK
5.3.9
Configure module as a server
:
AT+CIPSERVER
Syntax
:
command
type
grammar
Responses
Description
Execution
command
AT+CIPSERVER=<mode>[,<port>]
OK
Succeed to set up a server
port
+CME ERROR: no change
This port has already been
set up
Notes
Need AT+CIPMUX=1 first to turn on multi-connection mode.
To monitor 2 ports at most at the same time and 4 links at maximum can be
established,
including TCP and UDP.
If there is a client to connect the module which works as a server:
<linkid>,CONNECT OK
parameter definition
:
parameter
definition
value
value instruction
<mode>
whether turn on server
mode
0
turn off server mode
Note: Need reboot after using