Giter Club home page Giter Club logo

esp2sota's Introduction

ESP Self Sufficient OTA Library (ESP2SOTA)

Pangodream Logo

Based on the basic Arduino OTA example, this library gives you the possibility of updating Over The Air ESP8266 & ESP32 cards in both Wifi modes:

  • Wifi Client mode
  • Wifi AP mode

As you probably know, if you try to write in the same sketch the WifiAccessPoint code and the OTAWebUpdater one you will get an error in your web browser because OTAWebUpdater code tries to retrive jQuery library from the client browser, and that is something impossible because the ESP card is acting as Internet Gateway. The solution is:

  • Avoid using external Javascript libraries to control the binaries uploading to the ESP Webserver (this can be done by using Vanilla Javascript instead of jQuery)

Additionally, ESP2SOTA library improves significantly the aspect of OTAWebUpdater upload webpage:

ESP2SOTA Upload page

Installation

  • Download the latest version .zip file from [GitHub]
  • Add the dowloaded library to your Arduino IDE

Use

All you need (if your sketch already uses Webserver) to implement ESP2SOTA functionality in your sketch is:

  • Including:
#include <ESP2SOTA.h>

and

  • Initializing:
ESP2SOTA.begin(&server);

If your sketch doesn't use Webserver as part of it's functionality, both Client and AP examples show the needed code to support ESP2SOTA.

Examples of use

You can find two different examples of implementation under the folder examples

esp2sota's People

Contributors

pangodream 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

Watchers

 avatar  avatar

esp2sota's Issues

Blank page - Not found: /

I get a blank page with Not found:/ after i upload the AP sketch and connect to it.

if i navigate to /myurl i do get the plain text hello world

from what i get from the library it should get the library idex.html by default but it is not

Any idea why?

Esp32 wifi disconnects while bin file transfer

I am running ESP2SOTA on ESP32 as AP, somehow, wifi keeps getting disconnected during update file transfer, and hence the progress bar stops. I would have to try 10 or more time to success once.

shorter files of program code goes through without issues, may be , the transfer completes before disconnection.

any help would be appreciated.

Custom index_html.h?

Certainly appreciate the effort you put into making this library. Many thanks.

Would it be possible to modify the library so that a custom index_html.h file could be passed rather than using the one coded into the library?

Or have an index_html.h file in the same project directory as the .ino file override the one in the library?

I did take a look at the source but my C++ skills aren't there yet to propose a PR.

Adding SDCard Library conflict

Hi,
I want to use SDCard in my system and for that I am using SDFat library when I add that library and define File I am getting error.

error: 'File' was not declared in this scope

If I do either SDFat library or ESP2SOTA it's working fine but together getting File not declared in scope error.

No site updating

Nice little help that also works regarding the OTA update.
I tested client mode (-> browser) and AP mode (-> mobile phone).
But unfortunately the progress bar is not updated (on mobile and browsers like Firefox/Edge) and stays at 0%.
I usually see the final OK/failed output on my cell phone, but never in the browser display.
Maybe something is missing in the HTML script area?
Regards.

P.S.:
I've revised the index_html.h a bit so that the HTML can be edited more easily.
The HTML code itself is expanded for full screen display without zooming every time.
Use it as you like.
index_html.zip

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.