ESP8266-01 Learning Note 02: Instruction Set and considerations

Source: Internet
Author: User
Tags port number

Set the name and password of the WiFi module (AP mode)
At+cwsap= "ESP8266", "1234567890", 5,3

This module can operate in three modes: 1. STA 2. AP 3. Ap+sta, factory set to the third type

STA mode: Station, similar to the wireless terminal, the STA itself does not accept wireless access, it can connect to the AP, the general wireless network card is working in the mode. At+cwmode=1/2/3

The following is an example of establishing a TCP server as a ESP8266 SoftAP:
To set WiFi mode:
at+cwmode=2//Softap+station mode
Response:ok
? To enable multiple connections:
At+cipmux=1
Response:ok
? To establish a TCP server:
At+cipserver=1//Default port = 333
Response:ok

? The PC is connected to the ESP8266 softap,pc as a TCP client connection device.

? Setting up ports
Send command: at+cipserver=1,8080 (set instruction)? directive: at+cipserver=[,]?
Description:: 0-Turn off server mode, 1-turn on server mode???????: port number, default value is 333?

Use the phone can also connect ESP8266, network debugging assistant send information
A little light is also possible.
As long as the socket is available,

Cipmux=1 (Multi-connection), cannot be set to cipmode=1 (pass through)
Cipmux=0 (single connection), cannot set cipmode=0 (cannot pass through)
You can only open the server when you are Cipmux=1

Software Design: Is the first to install ESP01 firmware, modify a good Android phone control software, you can control the ESP01 3 io, GPIO0, GPIO2, TX. (Note The default is high), through the mobile phone side control level, to achieve the control of the USB switch.

Wiring when brushing the firmware:
8266 Module USB Turn TTL
VCC 3.3V
GND GND
RX TX
TX RX
CH_PD 3.3V
GPIO0 GND

At+gmr
View version

Vcc,gnd,txd,rxd and single-chip microcomputer's vcc,gnd,rxd,txd connected, even if it's done?

To ESP8266 alone power, must give him to connect to Vcc,gnd can not find the words, with two 1.5v battery connected after series, but to pay attention to the voltage to enough, when the voltage is insufficient, can not successfully let 8266 work, also can not find WiFi.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.