ESP32-WROVER User Guide Version 1.
About This Guide This document is intended to help users set up the basic software development environment for developing applications using hardware based on the ESP32-WROVER. Through a simple example, this document illustrates how to use ESP-IDF (Espressif IoT Development Framework), including the menu based configuration wizard, compiling the ESP-IDF and firmware download to the ESP32 module. The document is structured as follows. Release Notes Date Version Release notes 2017.05 V1.0 First release.
Table of Contents 1. Introduction............................................................................................................................. 1 1.1. ESP32 ........................................................................................................................................1 1.2. ESP-IDF .....................................................................................................................................1 1.3. Preparing the Hardware ..........................
1. Introduction ! 1. Introduction 1.1. ESP32 ESP32 integrates Wi-Fi (2.4 GHz band) and Bluetooth 4.2 solutions on a single chip, along with dual high performance cores and many other versatile peripherals. Powered by 40 nm technology, ESP32 provides a robust, highly integrated platform to meet the continuous demands for efficient power usage, compact design, security, high performance, and reliability.
2. Getting Started ! 2. Getting Started 2.1. Standard Setup of Toolchain for Linux Depending on your experience and preferences, you may follow standard installation process or customize your environment. Instructions immediately below are for standard installation. To set up the system your own way go to section Customized Setup of Toolchain. 2.1.1.
2. Getting Started ! alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin" Then when you need the toolchain you can type get_esp32 on the command line and the toolchain will be added to your PATH. 2.2. Get ESP-IDF Once you have the toolchain (that contains programs to compile and build the application) installed, you also need ESP32 specific API / libraries. They are provided by Espressif in ESP-IDF repository.
3. Start a Project ! 3. Start a Project Now you are ready to prepare your application for ESP32. To start off quickly, we will use get-started/hello_world project from examples directory in IDF. Copy get-started/hello_world to ~/esp directory: cd ~/esp cp -r $IDF_PATH/examples/get-started/hello_world . You can also find a range of example projects under the examples directory in ESP-IDF. These example project directories can be copied in the same way as presented above, to begin your own projects.
4. Configuration ! 4. Configuration You are almost there. To be able to proceed further, connect ESP32-WROVER to PC, check under what serial port the board is visible and verify if serial communication works. Being in terminal window, go to directory of hello_world application by typing cd ~/esp/ hello_world.
5. Build and Flash ! 5. Build and Flash 5.1. Build and Flash Now you can build and flash the application. Run: make flash This will compile the application and all the ESP-IDF components, generate bootloader, partition table, and application binaries, and flash these binaries to your ESP32 board. esptool.py v2.0-beta2 Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)... esptool.py v2.0-beta2 Connecting........___ Uploading stub... Running stub... Stub running...
5. Build and Flash ! If there are no issues, at the end of build process, you should see messages describing progress of loading process. Finally, the end module will be reset and “hello_world” application will start. 5.2. Monitor To see if “hello_world” application is indeed running, type make monitor.
6. SSC Command Reference ! 6. SSC Command Reference Here lists some common Wi-Fi commands for you to test the module. 6.1. op Description op commands are used to set and query the Wi-Fi mode of the system. Example op -Q op -S -o wmode Parameter Table 6-1. op Command Parameter Parameter Description -Q Query Wi-Fi mode. -S Set Wi-Fi mode. There are 3 Wi-Fi modes: wmode • mode = 1: STA mode • mode = 2: AP mode • mode = 3: STA+AP mode 6.2.
6. SSC Command Reference ! Parameter Description -s ssid Scan or connect Access Points with the ssid. -b bssid Scan the Access Points with the bssid. -n channel Scan the channel. -h Show scan results with hidden ssid Access Points. -Q Show STA connect stutus. -D Disconnected with current Access Points. 6.3. ap Description ap commands are used to set the parameter of AP network interface.
6. SSC Command Reference ! Parameter Table 6-4. mac Command Parameter Parameter Description -Q Show MAC address. -o mode • mode = 1: MAC address in STA mode. • mode = 2: MAC address in AP mode. 6.5. dhcp Description dhcp commands are used to enable or disable dhcp server/client. Example dchp -S [-o mode] dhcp -E [-o mode] dhcp -Q [-o mode] Parameter Table 6-5. dhcp Command Parameter Parameter Description -S Start DHCP (Client/Server). -E End DHCP (Client/Server). -Q show DHCP status.
6. SSC Command Reference ! Parameter Table 6-6. ip Command Parameter Parameter Description -Q Show IP address. -o mode • mode = 1 : IP address of interface STA. • mode = 2 : IP address of interface AP. • mode = 3 : both -S Set IP address. -i ip IP address. -m mask Subnet address mask. -g gateway Default gateway. 6.7. reboot Description reboot command is used to reboot the board. Example reboot 6.8. ram ram command is used to query the size of the remaining heap in the system.
FCC Warning: Any changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operaion.