Espressif ESP8266 Series User manual

!
Version 1.0
Copyright © 2016
ESP8266 Ping Test
Demonstration

About This Guide
The document is structured as follows:
Release Notes
Chapter
Title
Content
Chapter 1
Overview
Introduction to the ping test demonstration.
Chapter 2
Architecture of the
Demonstration
Introduction to the architecture of the ping test demonstration.
Chapter 3
Environment Setup
Introduction to the hardware and software environment of the
ping test demonstration.
Chapter 4
Test Procedure
Introduction to the procedures of the ping test demonstration.
Chapter 5
Conclusion of the
Demonstration
Conclusion of the ping test demonstration.
Appendix Ⅰ
Installing UART Driver of
the ESP-Launcher
Introduction to the installation of the UART driver on the PC, and
how to use the UART debug tool.
Appendix Ⅱ
Flash Download Tool
Guide
Introduction to the Espressif flash download tool, and how to use
it to download the firmware into the ESP-Launcher.
Date
Version
Release Notes
2016.09
V1.0
Initial release.

Table of Contents
1. Overview 1................................................................................................................................
2. Architecture of the Demonstration 2........................................................................................
3. Environment Setup 3................................................................................................................
3.1. Environment Preparation!3"............................................................................................................
3.1.1. Hardware Preparation!3"...................................................................................................
3.1.2. Software Preparation!3"....................................................................................................
3.2. Hardware Connection!4"................................................................................................................
3.3. Software Installation!4"...................................................................................................................
3.4. The ESP-Launcher!4".....................................................................................................................
4. Test Procedure 5.......................................................................................................................
4.1. Download Firmware!5"...................................................................................................................
4.2. Set ESP8266 to AP Mode for Ping Test!6".....................................................................................
4.3. Set ESP8266 to Station Mode for Ping Test!8"..............................................................................
5. Conclusion of the Demonstration 11.......................................................................................
I. Appendix - Installing UART Driver for ESP-Launcher 12........................................................
II. Appendix - Flash Download Tool User Guide 16....................................................................

#
1. Overview
1. Overview
This guide is intended to help users run ping test on the ESP8266 easily and quickly. It
demonstrates the testing of network connectivity by running ping test in Station mode or
SoftAP mode of ESP8266.
The ping test has been demonstrated and run on the ESP-Launcher. However, with
appropriate build settings, the test can be made to run on any ESP8266-based system.!
Espressif
#/#1 19
2016.09

#
2. Architecture of the Demonstration
2. Architecture of the
Demonstration
The architecture of the ping test demonstration is as follows:
•When the ESP8266 runs in SoftAP mode, the architecture of the ping test
demonstration is as Figure 2-1 shows.
#
Figure 2-1. ESP8266 Running in SoftAP Mode
•When the ESP8266 runs in Station mode, the architecture of the ping test
demonstration is as Figure 2-2 shows.
#
Figure 2-2. ESP8266 Running in Station Mode!
Espressif
#/#2 19
2016.09

#
3. Environment Setup
3. Environment Setup
3.1. Environment Preparation
3.1.1. Hardware Preparation
3.1.2. Software Preparation
Table 3-1. Hardware Preparation
Name
Figure
Quantity
Description
ESP-Launcher
(ESP8266 demo board)
1
The development board with ESP8266.
Whip antenna is needed.
Micro USB Cable
1
To connect the ESP-Launcher to the PC.
•PC provides power supply.
•User can trace the log outputted from
ESP8266 on the PC UART tool.
PC
1
PC for running demo tools:
Windows XP or Windows 7 OS is
recommended.
Android Mobile Phone
1
To run the Espressif phone APP:
Version Android4.0 or later is
recommended.
Router
1
To provide Wi-Fi network.
#
#
Table 3-2. Software Preparation
Name
Location
Description
demo.bin
./Bin-FW/
The firmware running on the ESP-Launcher
SecureCRT.rar
./Tools/
PC UART terminal emulator tool
(supports 74880 baud rate)
ft232r-usb-uart.zip
./Tools/
USB - UART converter driver
Flash Download Tool
./Tools/
To download the firmware into the ESP-Launcher
Espressif
#/#3 19
2016.09

#
3. Environment Setup
3.2. Hardware Connection
•ESP-Launcher connects to the PC via the Micro USB cable. For instructions on how to
install the UART driver on your PC, please refer to Appendix Ⅰ.
•A router through which ESP8266 can access the internet is needed.
3.3. Software Installation
Flash Download Tool is for downloading the firmware into the ESP-Launcher.
3.4. The ESP-Launcher
Figure 3-1. The ESP-Launcher
The switch “1”: toggle to the lower side
•Lower side: power-off
•Upper side: power-on
The switch “2”: toggle to the lower side
•Lower side: downloading firmware mode
•Upper side: program execution mode
The switch “3” (CHIP_EN Pin.): toggle to the upper side
•Lower side: chip disable
•Upper side: chip enable
The pin “4”: putting a jumper cap on the above 2 pins
The pin “5”: putting a jumper cap on it"
📖Notes:
•The firmware to be downloaded is in ./Bin-FW/.
•For information how to use Flash Download Tool, please refer to Appendix Ⅱ.
Espressif
#/#4 19
2016.09

#
4. Test Procedure
4. Test Procedure
4.1. Download Firmware
1. Download firmware into the ESP-Launcher. Use Flash Download Tool (ESP8266
DOWNLOAD TOOL) to download ./Bin-FW/demo.bin into address 0x0000. For more
details about using Flash Download Tool, please refer to Appendix Ⅱ.
#
Figure 4-1. Downloading Firmware
📖Notes:
•In general, the firmware needs to be downloaded only once.
•A new version of the firmware with improved functionality or new feature may be downloaded into the
ESP-Launcher again.
Espressif
#/#5 19
2016.09

#
4. Test Procedure
2. Run the firmware to confirm that the download is successful.
•Connect the ESP-Launcher to the PC using the Micro USB cable.
•Open the UART tool on your PC, and configure the baud rate as 115200.
•Toggle the switch “2” on the ESP-Launcher to the upper side to set it to be the
program execution mode.
•Next, toggle the switch “1” to the upper side to power up the ESP-Launcher.
•If the UART outputs the logs below, it means that the firmware is successfully
downloaded.
#
Figure 4-2. UART Output Logs
4.2. Set ESP8266 to AP Mode for Ping Test
1. Set UART baud rate to be 115200 for firmware installation. The illegible characters are
printed at the baud rate of 74880 and this is normal during correct power-up. Reset
ESP8266 upon power-on, when the “ready” message is printed, it means that the
firmware is running properly.
#
Figure 4-3. UART Output Logs
⚠Notice:
The baud rate of using AT commands is 115200.
Espressif
#/#6 19
2016.09

#
4. Test Procedure
2. After the “ready” message is displayed, users can send the AT command below to set
the SSID and password of ESP8266 SoftAP.
•AT command: AT+CWSAP=“Smart1ap”,“espressif0-1”,5,3
•Result:
#
Figure 4-4. Setting ESP8266 to AP Mode
3. Connect the PC to ESP8266 SoftAP of which SSID (Smart1ap) and password
(espressif0-1) are set in the Step 2 above.
4. Click the network icon #(in the task bar at the lower right corner of the PC desktop
screen). Connect the PC to the ESP8266 SoftAP (SSID: Smart1ap, password:
espressif0-1).
#
Figure 4-5. PC Connecting to ESP8266 SoftAP
⚠Notice:
•AT commands always terminate with “\r\n”. ESP8266 will not recognize commands not terminating
properly and will return “ERROR”.
•For more information on AT commands, please refer to ESP8266 AT Instruction Set.
⚠Notice:
It is recommended to have a PC with an external wireless card to connect to ESP8266 SoftAP as a station.
Using internal wireless card may cause poor Wi-Fi connectivity.
Espressif
#/#7 19
2016.09

#
4. Test Procedure
5. Run the command prompt on your PC. Type “cmd” in the “Run” dialogue to open a
command window. Then input command as is shown below to ping the ESP8266
SoftAP with the default IP address 192.168.4.1.
#
Figure 4-6. Ping ESP8266 SoftAP Using a PC
6. The result of ping test is as shown below:
#
Figure 4-7. Ping Test Result
4.3. Set ESP8266 to Station Mode for Ping Test
1. Set ESP8266 into Station mode.
•AT command: AT+CWMODE=1
📖Note:
The "-n 100" in the ping command specifies that the ESP8266 SoftAP is to be pinged 100 times.
⚠Notice:
•AT commands terminate with “/r/n”, and the baud rate is 115200 by default.
•For more information on AT commands, please refer to ESP8266 AT Instruction Set.
Espressif
#/#8 19
2016.09

#
4. Test Procedure
•Result:
#
Figure 4-8. Setting ESP8266 into Station Mode
2. Connect PC to a router. Suppose the SSID of the target router is “Smart1ap”, and the
password is “espressif0-1”.
3. Power up the ESP-Launcher, and connect ESP8266 to the same router by using the
following AT command.
•AT command: AT+CWJAP_DEF=“Smart1ap”,“espressif0-1”
•Result:
#
Figure 4-9. Connecting ESP8266 to the Router
4. Query the IP address of ESP8266.
•AT command: AT+CIFSR
•Result:
#
Figure 4-10. Querying the IP Address of ESP8266
📖Note:
Printed message “WIFI GOT IP” means that ESP8266 has established connection with the router
successfully and has been allocated an IP address.
Espressif
#/#9 19
2016.09

#
4. Test Procedure
5. Running command prompt on the PC again, and input the command shown below to
ping ESP8266 Station (IP address is 192.168.31.181 in this case) as Step 4 shows
above.
#
Figure 4-11. PC Pinging the ESP8266 Station
6. The result of ping test is as shown below:
#
Figure 4-12. Ping Test Result!
📖Note:
The “-n 100” in the ping command specifies that the ESP8266 Station should be pinged 100 times.
Espressif
#/#10 19
2016.09

#
5. Conclusion of the Demonstration
5. Conclusion of the
Demonstration
ESP8266 has two Wi-Fi operation modes, Station and SoftAP modes. PC can connect to
the ESP8266 in each Wi-Fi mode and test the connectivity by ping test. Both the SoftAP
ping test and the Station ping test can be used when the ESP8266 is configured to be in
Station + SoftAP mode.
The result of ping test depends on the network environment. The demo results of the ping
test in this document are results of open tests in a noisy environment, so the test results are
for reference only. More accurate results can be acquired by carrying out the tests in a
clean Wi-Fi environment.!
Espressif
#/#11 19
2016.09

#
Appendix I
I. Appendix - Installing UART
Driver for ESP-Launcher
1. Use a Micro USB cable to connect the ESP-Launcher to the PC. The UART driver needs
to be installed on the PC.
#
Figure Ⅰ-1. Installing UART Driver on PC
Finish installing the UART driver on the PC:
#
Figure Ⅰ-2. UART Driver Installed
2. Unzip ./Tools/SecureCRT.rar, and open the SecureCRT to check if the UART driver is
installed successfully.
⚠Notice:
If the PC does not install the UART driver automatically, user can install it manually. Espressif provides the
UART driver in ./Tools/ft232r-usb-uart.zip.
📖Notes:
The UART configuration of the ESP-Launcher should be as follows:
•Baud rate: 74880 (by default) or 115200 (for AT commands)
•8N1 (Data bits: 8, Parity bit: None, Stop bit: 1)
•Flow control: disabled
•If AT commands are used, the SecureCRT should be set into “New Line Mode”, because that AT
commands are ended with a new-line (CR-LF).
Espressif
#/#12 19
2016.09

#
Appendix I
•If it is the first time you are using the SecureCRT, create a new serial port connection.
Set the configuration by referring to the screenshot below. Choose “Serial” protocol
and no flow control. Set the actual port number by finding out the assigned port from
the “Device Manager” of PC.
#
Figure Ⅰ-3. Creating a New Serial Port Connection
-If the serial port connection was created before, users can change its
configuration by right-clicking on it, and selecting “properties”.
#
Figure Ⅰ-4. Checking the “Properties” of the Serial Port
Espressif
#/#13 19
2016.09

#
Appendix I
-Select the “Serial” page in the “Properties” window to check the configuration of
the serial connection.
"
Figure Ⅰ-5. Checking the “Serial” in “Properties” Window
•If AT commands are used, the baud rate should be 115200, and the “New Line
Mode” should be set because the AT commands end with a new line (CR-LF).
"
Figure Ⅰ-6. Setting the “New Line Mode” for AT Commands
Espressif
#/#14 19
2016.09

#
Appendix I
3. Power up the ESP-Launcher by toggling the switch “1” to the upper side. Check if the
startup logs (baud rate 74880) are displayed on the SecureCRT.
#
Figure Ⅰ-7. Startup Logs
4. User can connect / disconnect the serial port by clicking these two buttons
#at the upper left corner of the SecureCRT.
•The left button is to create a serial port connection.
•The right button is to abort the connection.
📖Note:
The default baud rate of ESP8266 is 74880. But to use AT commands, the baud rate should be 115200.
Espressif
#/#15 19
2016.09

#
Appendix Ⅱ
II. Appendix - Flash Download
Tool User Guide
1. Double click the ./Tools/FLASH_DOWNLOAD_TOOLS_v2.4_150924/
ESPFlashDownloadTool_v2.3+.exe to run the Flash Download Tool.
2. Fill the Download Path Config area with the location of the firmware which is to be
downloaded, and download it to ADDR 0x0000. SPI SPEED is 40 MHz, SPI MODE is
QIO, FLASH SIZE is 8 Mbit. And select the corresponding COM port.
#
Figure Ⅱ-1. Flash Download Tool
📖Note:
The selected firmware in the Download Path Config area will turn into green and be downloaded into the
ESP-Launcher. If there is any other firmware which is not selected, it will be ignored.
Espressif
#/#16 19
2016.09

#
Appendix Ⅱ
3. Click the “START” button on the ESP8266 Flash Download Tool to enter the “SYNC”
state. Wait for the ESP-Launcher to power up.
#
Figure Ⅱ-2. “SYNC” State of Flash Download Tool
4. Power up the ESP-Launcher, and start downloading firmware.
•Toggle the switch “2” to the lower side to set ESP-Launcher to download mode. And
toggle the switch “1” to the upper side to power up the ESP-Launcher. More details
about the ESP-Launcher are in Section 3.4.
#
Figure Ⅱ-3. ESP-Launcher
•The Flash Download Tool will start to download firmware into the ESP-Launcher. The
DETECTED INFO area on the ESP8266 Flash Download Tool will display information
about the flash chip on the ESP-Launcher.
#
Figure Ⅱ-4. Starting Downloading Firmware
Espressif
#/#17 19
2016.09
Other manuals for ESP8266 Series
4
Table of contents