Giter Site home page Giter Site logo

esp-jumpstart's Introduction

If you have already been using ESP Jumpstart, please have a look at some breaking Changes.

ESP-Jumpstart

[中文]

Cover Page
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?

ESP-Jumpstart is focused on building ’products’ on ESP32. It is a quick-way to get started into your product development process. ESP-Jumpstart builds a fully functional, ready to deploy “Smart Power Outlet” in a sequence of incremental tutorial steps. Each step addresses either a user-workflow or a developer workflow. Each step is an application built with ESP-IDF, ESP32’s software development framework.

Smart Power Outlet

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 user’s home Wi-Fi network configuration through phone applications (iOS/Android)
  • Ability to switch on or off a single GPIO output
  • Use a push-button to physically toggle this output
  • Allow remote control of this output through a cloud
  • Implements over-the-air (OTA) firmware upgrade
  • Performs Reset to Factory settings on long-press of the push-button

Building your production firmware, is a matter of replacing the power-outlet’s device driver, with your device driver (bulb, washing machine).

Jumpstart Applicability

You will require the following to get started:

Please ensure to use ESP-IDF v4.4 from either the tagged release or the following command,

git clone --recursive https://github.com/espressif/esp-jumpstart.git
git clone -b release/v4.4 --recursive https://github.com/espressif/esp-idf.git
cd esp-jumpstart
export IDF_PATH=</path/to/esp-idf/>

Documentation Build Status

Documentation Status

esp-jumpstart's People

Contributors

anurag-kar avatar bubblesnake avatar chhajedji avatar dhrishi avatar igrr avatar jitin17 avatar kedars avatar krzychb avatar mahavirj avatar natashali-espressif avatar shahpiyushv avatar skywxfang avatar supreetd21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-jumpstart's Issues

Issue with wifi_provisioning/manager.h library on ESP8266

I am trying to follow along the ESP Jumpstart guide and working on Unified Provisioning part using ESP8266. Everything was working correctly untill I came to Unified Provisioning section. On running the code under 4_network_config, I am getting the below error

CC build/main/app_main.o /<directory>/app_main.c:17:10: fatal error: wifi_provisioning/manager.h: No such file or directory #include <wifi_provisioning/manager.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [/<directory>/ESP8266_RTOS_SDK/make/component_wrapper.mk:292: app_main.o] Error 1 make: *** [/<directory>/ESP8266_RTOS_SDK/make/project.mk:571: component-main-build] Error 2

I have all the required files in //ESP8266_RTOS_SDK/components/wifi_provisioning/include/wifi_provisioning/ which can also be confirmed by using "Go to Definition" feature of vscode.

The environment for ESP8266 was setup by following the guide https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html

Setup Issue with Eclipse

I cloned the Jumpstart repository on my local drive. Instead of using command line to compile & flash dev kit, can I compile the projects within the Jumpstart repository using Eclipse IDE (espressif IDF setup is correctly installed)? What are the steps I need to follow in Eclipse while opening any of those examples?
I tried foll. option of "Open projects thru File System" in eclipse ide and opened the "1_Hello_World" example within the "esp-Jumpstart" folder but it does not give me the option to compile the project.

how to configure esp-jumpstart/5_cloud with the aws files?

I get this error on building;
In file included from ../main/cloud_aws.c:16:
../main/aws_custom_utils.h:4:10: fatal error: aws_iot_error.h: No such file or directory
#include "aws_iot_error.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
Thanks in advance

Can't remote control led state

Hi,

commit id: 5477e48

I'm currently using the latest jumpstart, but i can't remote control led state by Remote Control

cmd:

curl -d '{"state":{"desired":{"output":false}}}'      --tlsv1.2 --cert cloud_cfg/device.cert      --key cloud_cfg/device.key      https://a3orti3lw2padm-ats.iot.us-east-1.amazonaws.com:8443/things/f8dc19f3-2454-40a6-a

or:

curl -d '{"state":{"desired":{"output":true}}}'      --tlsv1.2 --cert cloud_cfg/device.cert      --key cloud_cfg/device.key      https://a3orti3lw2padm-ats.iot.us-east-1.amazonaws.com:8443/things/f8dc19f3-2454-40a6-af1f-76eb04dd947e/shadow      | python -mjson.tool

WS2812 LED is disabled

I keep getting this message in the terminal whenever I try to flash the ESP32. Just wondering if this is standard

W (297) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (311) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (322) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 I (332) gpio: GPIO[19]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 W (342) ws2812_led: WS2812 LED is disabled

CMakelist.txt include "cloud.c"

While build this jumpstart sample use " make app" , build will pass normally. try to use build command "idf.py app" , then result will fail.
Build error message :
Call Stack (most recent call first):

/home/budipras/esp/esp-idf/tools/cmake/component.cmake:500 (idf_component_register)
 main/CMakeLists.txt:8 (register_component)

it seems issue caused by "cloud.c" in CMakelist.txt of main folder. While change to "cloud_aws.c" then issue solve, but another issue appears ::

Scanning dependencies of target __idf_main [100%] Linking CXX static library libmain.a [100%] Built target __idf_main [100%] Generating ld/esp32.project.ld [100%] Built target __ldgen_output_esp32.project.ld [100%] Built target __idf_build_target [100%] Linking CXX executable 7_mfg.elf /home/budipras/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x18): undefined reference to app_main'
/home/budipras/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function main_task': /home/budipras/esp/esp-idf/components/esp32/cpu_start.c:513: undefined reference to app_main'
collect2: error: ld returned 1 exit status
CMakeFiles/7_mfg.elf.dir/build.make:333: recipe for target '7_mfg.elf' failed
make[3]: *** [7_mfg.elf] Error 1
CMakeFiles/Makefile2:678: recipe for target 'CMakeFiles/7_mfg.elf.dir/all' failed
make[2]: *** [CMakeFiles/7_mfg.elf.dir/all] Error 2
CMakeFiles/Makefile2:1305: recipe for target 'CMakeFiles/app.dir/rule' failed
make[1]: *** [CMakeFiles/app.dir/rule] Error 2
Makefile:645: recipe for target 'app' failed
make: *** [app] Error 2
make failed with exit code 2`

Any idea to solve idf.py build?

Documentation does not match the code

The code snippets in the documentation do not match the actual code from 2_drivers.
For example the function "app_driver_toggle_state()" is not used anywhere in the jumpstart project.

Also for example in the docs it says:

"The push_btn_cb code then is simply as shown below:"

static void push_btn_cb(void* arg)
{
    static uint64_t previous;
    uint64_t current = xTaskGetTickCount();
    if ((current - previous) > DEBOUNCE_TIME) {
        previous = current;
        app_driver_set_state(!g_output_state);
    }
}

But the actual code is:

static void push_btn_cb(void *arg)
{
    app_driver_set_state(!g_output_state);
}

Content of the app_driver_set_state(!g_output_state);

int IRAM_ATTR app_driver_set_state(bool state)
{
    if(g_output_state != state) {
        g_output_state = state;
        set_output_state(g_output_state);
    }
    return ESP_OK;
}

The function xTaskGetTickCount() is explained in the documentation, but also not used in the code.

What is exactly the point of having documentation and explaining code, that is not even used in the actual jumpstart project?

Setup problems.

Hi. I'm having difficulties with the very first steps. Running on windows 10. I followed the msys32 setup procedure from https://docs.espressif.com/projects/esp-idf/en/release-v3.3/get-started/index.html. I can successfully run the standard hello world demo from the esp-idf examples folder.

However, when I try to run the first example in the jumpstart, I receive the following errors:

$ make flash
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/thebi/esp/esp-idf/requirements.txt are satisfied.

Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
App "1_hello_world" version: 1
CC build/app_update/esp_app_desc.o
AR build/app_update/libapp_update.a
Generating libapp_update.a.sections_info
Generating esp32.project.ld
LD build/1_hello_world.elf
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lmicro-ecc
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lmqtt
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lnewlib
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lnimble
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lnvs_flash
collect2.exe: error: ld returned 1 exit status
make: *** [C:/msys32/home/thebi/esp/esp-idf/make/project.mk:483: /home/thebi/esp/1_hello_world/build/1_hello_world.elf] Error 1

I've followed the guide to the letter I believe. I copied the git clone exactly with the --recursive flag. Any clues what these erros mean.

Update

I completely erased everything and rebuilt. It now works perfectly. Well done Espressif!

Failed to read key serial_no with error 4354 size 0

Hello, I am running idf v4.0 and having issues with the Manufacturing example "7_mfg". I have followed the instructions to generate and flash the my_mfg.bin file, as well as flashing the firmware. I get the following error when reading the serial_no, cert, and key:

Starting cloud
D (5820) nvs: nvs_flash_init_custom partition=fctry start=832 count=6
D (5830) nvs: nvs_open_from_partition mfg_ns 0
D (5830) nvs: nvs_get_str_or_blob serial_no
E (5830) cloud: Failed to read key serial_no with error 4354 size 0

Let me know any other information you need to help me out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.