One. Configure WiFi mode
1.Station Mode: Station is the AP client mode, the wireless card as the receiving point mode (accept)
2.AP Mode: AP is the meaning of the base station, is the meaning of the transmitting station, wireless router (send)
3.AP and Station mode
Configured with: at+cwmode=x (x = #)
such as:at+cwmode=2
Response: OK
---------------------------------------------------------------------------
Two. Set the parameters in AP mode
Setup directive: at+ cwsap= <ssid>,<pwd>,<chl>, <ecn>
Instruction is valid only after AP mode is turned on
<ssid> string parameter, Access point name
<pwd> string parameter, password maximum 64 bytes ASCII
<chl> Channel number
< ECN >
0 OPEN
1 WEP
2 WPA_PSK
3 WPA2_PSK
4 WPA_WPA2_PSK
(need to know further)
such as: at+cwsap= "ESP8266", "0123456789", 11,0
Response: OK
ERROR
1.esp8266 for the search to the WiFi name
---------------------------------------------------------------------------
Three. Restart
At+rst
Response: OK
---------------------------------------------------------------------------
Four. Start multiple connections
at+cipmux=0; single-channel connection
at+cipmux=1; multi-channel connection
Response
If the format is correct and the connection is successful, return
Ok
otherwise return
ERROR
such as:at+cipmux=1
If the connection already exists, return
Alreay CONNECT
Five. Configure As Server
at+ Cipserver=<mode>[,<port>]
Parameter description
<mode>0 shutting down the server mode
1 Turn on server mode
<port> port number, default value is 333
Response
Ok
Shutting down the server requires a restart
Description
Automatically set up server snooping after opening server
When there is a client access, it automatically takes up a connection sequentially
at+ cipmux=1 to open the server
Example:at+cipserver=1,5000 open TCP service port
ESP8266 Debug Notes