Code Monkey home page Code Monkey logo

corsacota's Introduction

corsacOTA

An esp8266/esp32 websocket OTA library.

deploy status test status license

Warning: This project is not yet ready for production, API and document are subject to change without notice.

Features

  • โš™๏ธ Fine-granular OTA management.
  • ๐Ÿ“ฆ A frontend component out of the box.
  • ๐Ÿ”จ Easy to integrate into user projects.
  • โœ‚๏ธ No need to embed the frontend page, lower firmware and memory usage.
  • ๐Ÿš€ Lightweight and fast WebSocket implementation.

Use the web client for OTA

๐ŸŒ Demo Site

corsacOTA.mp4

Usage

corsacOTA works with esp-idf.

Just add src/corsacOTA.c to your project:

co_handle_t handle;
co_config_t config = {
    .thread_name = "corsacOTA",
    .stack_size = 4096,
    .thread_prio = 8,
    .listen_port = 3241,
    .max_listen_num = 4,
    .wait_timeout_sec = 60,
    .wait_timeout_usec = 0,
};

corsacOTA_init(&handle, &config);

Related examples of use can be found here: examples

Document

API for frontend

corsacOTA provides a default frontend for performing online OTA, and you can also implement it yourself. See: corsacOTA API on postman

postman screenshot

Parition table

Currently supported OTA partition table modes: Factory app, two OTA definitions.

Motivation and Notes

Ease of use, minimal dependencies, and fine-grained OTA management were the starting points for this project.


Why do we use websockets in our projects?

In the world of browser, the use of websockets is somewhere between pure sockets and HTTP. Considering that most of the usage scenarios are in the browser, we have chosen websocket.

However, WebSocket is not always a good idea because operations such as handshake and mask add a certain level of complexity. If the network is good, then other solutions should achieve the same results.

Nevertheless, it has some advantages in complex network conditions with frequent packet loss, where you can achieve easy flow control and more precise progress control in the browser.

Overall, our solution is a compromise between ease of use, compatibility and speed.

Dependency

For the main part of the project, there are no dependencies on third-party libraries other than esp-idf.

For frontend:

Credit

Credits to the following project, people and organizations:

corsacota's People

Contributors

windowsair avatar dependabot[bot] 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.