Git Product home page Git Product logo

iot-reference-esp32c3's Introduction

Featured FreeRTOS IoT Integration on ESP32-C3 RISC-V MCU

Introduction

This repository contains a project that demonstrates how to integrate FreeRTOS modular software libraries with the hardware capabilities of the ESP32-C3 RISC-V MCU and the enhanced security capabilities provided by its Digital Signature (DS) peripheral and Secure Boot V2. The project contains reference implementations that demonstrate IoT application tasks that run concurrently and communicate with enhanced security with AWS IoT. The implementation also shows how to perform over-the-air firmware updates that use the AWS IoT OTA service and the secure bootloader capabilities of Secure Boot V2. The reference implementation runs on the ESP32-C3-DevKitM-1 IoT development board.

See the Featured IoT Reference Integration page for the ESP32-C3 on FreeRTOS.org for more details about the DS peripheral, Secure Boot and OTA.

Cloning the Repository

To clone using HTTPS:

 git clone https://github.com/FreeRTOS/iot-reference-esp32c3.git --recurse-submodules

Using SSH:

 git clone [email protected]:FreeRTOS/iot-reference-esp32c3.git --recurse-submodules

If you have downloaded the repo without using the --recurse-submodules argument, you should run:

git submodule update --init --recursive

Demos

This repository currently supports 3 demos implemented as FreeRTOS tasks, each of which utilize the same MQTT connection. The demos use the coreMQTT library, while the coreMQTT-Agent library is employed to manage thread safety for the MQTT connection. The demos are the following:

  • ota_over_mqtt_demo: This demo uses the AWS IoT OTA service for FreeRTOS to configure and create OTA updates. The OTA client software on the ESP32-C3 uses the AWS IoT OTA library and runs in the background within a FreeRTOS agent (or daemon) task. A new firmware image is first signed and uploaded to the OTA service, and the project is then configured to store the corresponding public key certificate. The demo subscribes to, and listens on, an OTA job topic in order to be notified of an OTA update. Upon receiving notification of a pending OTA update, the device downloads the firmware patch and performs code signature verification of the downloaded image by using the public key certificate. On successful verification, the device reboots and the updated image is activated. The OTA client then performs a self-test on the updated image to check for its integrity.
  • sub_pub_unsub_demo: The demo creates tasks which subscribe to a topic on AWS IoT Core, publish a constant string to the same topic, receive their publish (since they are subscribed to the topic they publish to), and then unsubscribe from the topic in a loop.
  • temp_sub_pub_and_led_control_demo: This demo creates a task which subscribes to a topic on AWS IoT Core. This task then reads the temperature from the onboard temperature sensor, publishes this information in JSON format to the same topic, and then receives this publish (since it is subscribed to the same topic it just published to) in a loop. This demo also enables a user to send a JSON packet back to the device to turn an LED off or on.

All three demos can be selected to run together concurrently as separate tasks.

Getting started with the demos

To get started and run the demos, follow the Getting Started Guide.

Contributing

See CONTRIBUTING for more information.

License

Example source code under ./main/ is licensed under the MIT-0 License. See the LICENSE file. For all other source code licenses including components/, see source header documentation.

iot-reference-esp32c3's People

Contributors

amazon-auto avatar dhavalgujar avatar gitwallit avatar jasonpcarroll avatar liennguyen2910 avatar

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.