Coder Social home page Coder Social logo

giofranco / esp32-softap-ota Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeija/esp32-softap-ota

0.0 0.0 0.0 29 KB

Minimal esp-idf example of HTTP portal to perform OTA updates of ESP32 in SoftAP mode

License: MIT License

CMake 3.47% Shell 2.78% C 67.22% HTML 26.53%

esp32-softap-ota's Introduction

ESP32 Over-the-Air Updates in SoftAP mode

This repository contains a minimal working example of an over-the-air (OTA) firmware updater where the ESP32 receives the update while acting as an HTTP server in SoftAP mode. It is meant to be used with esp-idf, though it can also be integrated into arduino-esp32 projects.

It is particularly suitable for applications where you would like to deploy an ESP32 in a setting where it is not connected to the internet (i.e. automatically downloading updates is not applicable), yet the ESP32's UART interface is also not easily accessible. In that case, firmware updates can be performed from any device with a WiFi interface and a web browser in the ESP32's range.

This project is based on esp-idf's included OTA update mechanism, i.e. it uses a factory partition, a ota_0 partition and a ota_1 partition and updates are rolled back unless the updated firmware marks itself as valid (by calling esp_ota_mark_app_valid_cancel_rollback()).

Usage

  • The ESP32 broadcasts an open WiFi network with SSID ESP32 OTA Update. Connect to it and open http://192.168.4.1 in your web browser.
  • Make sure JavaScript is enabled in your Web Browser. The following website shows up: Screenshot
  • Click Browse..., select a firmware file (e.g. esp32-softap-ota.bin) and click Upload.
  • The website will upload the file and display the upload progress. If the upload is succesful and the app image is valid (magic byte), the ESP32 will reboot into the new firmware.
  • Always make sure the images you upload also contain the update functionality, otherwise you will lose the ability to OTA-update your ESP32.

Initial Build and Flash

Make sure you have a recent esp-idf version with support for cmake-based projects installed and configured properly. Then compile and flash this project as usual using the following steps:

  • idf.py all to compile everything
  • idf.py -p /dev/ttyUSBX flash to flash everything

License

This project is licensed under the MIT license. See LICENSE for details.

esp32-softap-ota's People

Contributors

jeija 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.