Link Search Menu Expand Document

ESP-Jumpstart

ESP-Jumpstart: Build ESP32 Products Fast

Building production-ready firmware can be hard. It involves multiple questions and decisions about the best ways of doing things. It involves building phone applications, and integrating cloud agents to get all the features done. What if there was a ready reference, a known set of best steps, gathered from previous experience of others, that you could jumpstart with?

The ESP-Jumpstart’s Smart Power Outlet firmware assumes the device has one input push-button, and one GPIO output. It implements the following commonly required functionality.

  • Allows and end-user to configure their home Wi-Fi network through phone applications (iOS/Android)
  • Switch on or off the GPIO output
  • Use a push-button to physically toggle this output
  • Allow remote control of this output through a cloud
  • Implement over-the-air (OTA) firmware upgrade
  • Perform Reset to Factory settings on long-press of the push-button

Once you are familiar with ESP-Jumpstart, building your production firmware, is a matter of replacing the power-outlet’s device driver, with your device driver (bulb, washing machine).

ESP-IDF - Getting Started

Getting ESP-Jumpstart

{
    cd ~/esp
    git clone --recursive https://github.com/espressif/esp-jumpstart
}

Since we are building a production-ready firmware here, we would want to base our development on a stable release of IDF. Currently, ESP-Jumpstart uses the stable version 4.0 of ESP-IDF. Let us first switch to that version of ESP-IDF.

{
    cd ~/esp/esp-idf
    git checkout -b release/v4.0 remotes/origin/release/v4.0
    git submodule update --recursive
}

Now we build our first, Hello World, application from ESP-Jumpstart and flash it on to our development board. You should be already familiar with most of the steps below.

{
    cd ~/esp/esp-jumpstart/1_hello_world
    export ESPPORT=/dev/cu.SLAB_USBtoUART
    export ESPBAUD=921600
    idf.py menuconfig
    idf.py flash monitor
}
...

[0] Hello world!
[1] Hello world!
[2] Hello world!

...

The Driver

The Devkit-C development board has a button called ’boot’ which is connected to GPIO 0. We will configure this button to be used to toggle the outlet’s state.

  • Change JUMPSTART_BOARD_OUTPUT_GPIO to 2 in 2_drivers/main/board_esp32_devkitc.h
{
    cd ~/esp/esp-jumpstart/2_drivers
    export ESPPORT=/dev/cu.SLAB_USBtoUART
    export ESPBAUD=921600
    idf.py menuconfig
    idf.py flash monitor
}

Network Configuration

{
    cd ~/esp/esp-jumpstart/4_network_config
    export ESPPORT=/dev/cu.SLAB_USBtoUART
    export ESPBAUD=921600
    idf.py flash monitor
}

Provisioning Tools

Provisioning applications are available for various platforms, along with source code:

The phone applications offer simple UI and thus more user centric, while the command line application is useful as a debugging tool for developers.

Now we have a smart outlet that the user can configure, through a phone app, to their home Wi-Fi network. Once configured, the outlet will keep connecting to this configured network. We also have the ability to erase these settings on a long-press of a push-button.


Page last modified: 7/20/2021.