Giter Site home page Giter Site logo

asyncelegantota's People

Contributors

ayushsharma82 avatar dushyantahuja avatar freestila avatar joostab avatar lukepalmer avatar manhere avatar mrdc avatar qistoph avatar smford avatar sui77 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asyncelegantota's Issues

[HTTP ERROR] Bad Request (at the end of uploading)

i have tried too many to know what is causing this problem and it was because i was using (Universal-Arduino-Telegram-Bot) Library and the line that caused this

WiFiClientSecure client;
UniversalTelegramBot bot(BOTtoken, client);

any idea to fix this problem ?

Not reboot after OTA complete

This is a fantastic library. Using it on ESP32. update complete (green tick appeared). However it does not restart afterwards. Pressing reset button did show that the update work. I check on the library it seems restart is implemented in the loop

Arduino lib builder abort() on core 0

Standard ESP32 example on standard Arduino IDE with default file system etc.

Can't update over OTA, getting "[HTTP ERROR] Bad Request"

Serial back log.

HTTP server started
assertion "new_rcv_ann_wnd <= 0xffff" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp.c", line 779, function: tcp_update_rcv_ann_wnd
abort() was called at PC 0x40105a17 on core 0

Backtrace: 0x4008c434:0x3ffb3d40 0x4008c665:0x3ffb3d60 0x40105a17:0x3ffb3d80 0x4011da22:0x3ffb3db0 0x4011dab1:0x3ffb3dd0 0x400d284e:0x3ffb3df0 0x40118ee0:0x3ffb3e10 0x40088b7d:0x3ffb3e40

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8

Reboots at 44%

Currently when I add this into my code and try and run it causes a panic and reboot. Here is the offending line:

0x400da842: AsyncElegantOtaClass::begin(AsyncWebServer*, char const*, char const*)::{lambda(AsyncWebServerRequest*, String, unsigned int, unsigned char*, unsigned int, bool)#4}::operator()(AsyncWebServerRequest*, String, unsigned int, unsigned char*, unsigned int, bool) const at .pio/libdeps/espressif32/AsyncElegantOTA/src/AsyncElegantOTA.h line 11

I looked at that line number and looks like maybe it has an invalid data len?
I have a custom 2M partition set could that be my issue?

Progress Bar goes to 100% due to Antivirus Caching

Hello,

  1. I am experiencing a strange behavior. I am trying to use this library on an ESP32 using AsyncWebServer.
    When I select the file for update (either spiffs or firmware), it starts the OTA immediately and also immediately displays that 100% was done. Then, it takes some time (in which I don't know what is going on as there is no indication) until it shows the success page and then reboots the ESP32. Any suggestion how I can make it work as expected, meaning that the gauge will work as the OTA process executes and will reach 100% only when all is done. Thanks!!!

  2. Any way to replace the ElegantOTA logo with something else?

Thanks a lot, Motti

Compile error in ESP32

In code line 49:

     #if defined(ESP8266)
         content_len = request->contentLength();
         int cmd = (filename.indexOf("spiffs") > -1) ? U_FS : U_FLASH;
         //uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;  
         Update.runAsync(true);
         if (!Update.begin(content_len, cmd)){ // Start with max available size
     #endif                    
     #if defined(ESP32)
         if (!Update.begin(UPDATE_SIZE_UNKNOWN, cmd)) { // Start with max available size
     #endif
             Update.printError(Serial);   
         }

cmd variable is not declared and compile stops for esp32. What cmd value should be ?

Suggestion for update to AsyncElegantOTA.h and elegantWebpage.h to simplify changes

Love the library. Just a small suggestion to make making changes to the elegantWebpage.h simpler. Rather than hard-coding ELEGANT_HTML_SIZE into elegantWebpage.h. Remove that const completely and compute it on the fly.

This would only require a simple change in AsyncElegantOTA.h

AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", ELEGANT_HTML, ELEGANT_HTML_SIZE);

becomes

AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", ELEGANT_HTML, sizeof(ELEGANT_HTML));

Then no matter how the PROGMEM array changes in the elegantWebpage, it will always load correctly without having to recompute the uint32 size and hardcoding it.

Upload shows completed, but still running old firmware

I have spent about good 30 minutes keep recompiling and doing OTA update, turns out AsyncElegantOTA was broken.

Upload shows completed on the webpage. The first issue, ESP8266-01 doesn't reboot. No big deal, I just recycle power. But turns out, it is still booting up with old firmware the whole time!!

I have tried to wait for a few minutes after the upload is completed before recycling power, the same result, only booting with old firmware...

A few references point:
HW: ESP8266-01 with 1MB
CPU: 80MHz
Flash size: 1MB (FS:64KB OTA ~470KB)
Sketch uses 434748 bytes
Actual bin file size 438896 bytes

Compile error using current ESP-IDF for ESP32: Hash.h: No such file or directory

Hi,

first, thanks for your nice contribution with this software!

However, the current version ESP-IDF for ESP32 does not contain a "Hash.h" header any more,
compilation fails with "AsyncElegantOTA.h:13:22: fatal error: Hash.h: No such file or directory"

However, the include does not seem to be necessary,
removing the #include "Hash.h" from line no. 13 makes the compilation succeed.

Compile Error ESP32

In file included from D:\GoogleDisk\Shared\Arduino\AsyncElegantOTA\AsyncElegantOTA.ino:5:0:

D:\GoogleDisk\Shared\Arduino\libraries\AsyncElegantOTA\src/AsyncElegantOTA.h: In lambda function:

D:\GoogleDisk\Shared\Arduino\libraries\AsyncElegantOTA\src/AsyncElegantOTA.h:50:71: error: 'U_FS' was not declared in this scope

                     int cmd = (filename.indexOf("spiffs") > -1) ? U_FS : U_FLASH;

                                                                   ^

D:\GoogleDisk\Shared\Arduino\libraries\AsyncElegantOTA\src/AsyncElegantOTA.h:51:32: error: 'class UpdateClass' has no member named 'runAsync'

                     Update.runAsync(true);

                            ^

ESP 32 does not compile

Hi

I try to use your Library but it will not compile.

I will get this errormessage

no known conversion for argument 1 from AsyncWebServer to AsyncWebServer*

any suggestion?

Martin

Not building for ESP32

Latest version is not building for ESP32:

AsyncElegantOTA.h:50:71: error: 'U_FS' was not declared in this scope

Oh - found Reason: The Arduino IDE is not installing the latest version of AsyncElegantOTA. Not shure who would have to fix this ....

How to update file system with OTA ?

Hi,
I use SPIFFS.h on my esp32 project (https://github.com/simonjamain/openmosfet) and I need to upload files as well as the software (in OTA), I'm struggling to find any usefull information on how to do it.

Does your library allows it ?
How do i do it ?
How do I create a .bin of my files (assuming that it is needed) ?

Thank you very much, great piece of software BTW.

Event support ilike onStart() sometime required to act upon.

Event support ilike onStart(), onEnd, on progress, onError() sometime required ito ntercept and needs to be acted upon.

onStart() Should raise as soon as the process started just after the initial sanity checking.

Others are self explanatory.

compile error in file AsyncElegantOTA.h from 24Jun2020

Hi Ayush,
please could you check this out in the new version?
Thank You and Best Regards,
Michael

C:\Users\Michael\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\AsyncElegantOTA/AsyncElegantOTA.h:94:52: error: '_FS_end' was not declared in this scope

                     size_t fsSize = ((size_t) &_FS_end - (size_t) &_FS_start);

same for _FS_start

Attempting to compile for ESP8266 and get no matching function call error

Using latest master versions of

ESPAsyncTCP, ESPAsyncWebServer and AsyncElevantOTA. Trying to compile the ESP8266 example and i get the following errors:

C:\Users\hewfish\Desktop\nodeMCU\test\asyncupdate\asyncupdate.ino: In function 'void setup()':

asyncupdate:34:31: error: no matching function for call to 'AsyncElegantOtaClass::begin(AsyncWebServer&)'

AsyncElegantOTA.begin(server); // Start ElegantOTA

                           ^

C:\Users\hewfish\Desktop\nodeMCU\test\asyncupdate\asyncupdate.ino:34:31: note: candidate is:

In file included from C:\Users\hewfish\Desktop\nodeMCU\test\asyncupdate\asyncupdate.ino:5:0:

C:\Users\hewfish\Documents\Arduino\libraries\AsyncElegantOTA\src/AsyncElegantOTA.h:28:14: note: void AsyncElegantOtaClass::begin(AsyncWebServer*)

     void begin(AsyncWebServer *server){

          ^

C:\Users\hewfish\Documents\Arduino\libraries\AsyncElegantOTA\src/AsyncElegantOTA.h:28:14: note: no known conversion for argument 1 from 'AsyncWebServer' to 'AsyncWebServer*'

Multiple libraries were found for "AsyncElegantOTA.h"
Used: C:\Users\hewfish\Documents\Arduino\libraries\AsyncElegantOTA
Not used: C:\Users\hewfish\Desktop\Arduino-NodeMCU\arduino-1.8.9-windows\arduino-1.8.9\libraries\AsyncElegantOTA
exit status 1
no matching function for call to 'AsyncElegantOtaClass::begin(AsyncWebServer&)'

Upload to filesystem

thanks for this great library.

At the moment we can only upload bin files to the filesystem.
I want to upload css, js and html files as well.
Would that be possible?

Changing the update path

This is not really an issue but rather a feature request. Would it be possible to have a variable that allows us to easily change the update path from /update to something like /otaupdate?

I need /update for something else and tried making manual changes but was unsuccessful.

OTA fails with access point

I've been testing your library, I need to do an update via a browser when running in access point but it fails.
Your example code work fine if I connect to a wifi router but if I set up an access point it gets to about 40% then hangs.
Is there anyway to run this via an access point

Many thanks

Compile error

Hello i receive this error when I try to compile your example for esp32:
Scheda:"WEMOS LOLIN32, 80MHz, Default, 240MHz (WiFi/BT), 115200"

C:\Users\giang\OneDrive\Documenti\Arduino\libraries\Hash\src\Hash.cpp:26:34: fatal error: bearssl/bearssl_hash.h: No such file or directory

compilation terminated.

This is the skecth demo:
#include <WiFi.h>
#include <Hash.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncElegantOTA.h>

const char* ssid = "........";
const char* password = "........";

AsyncWebServer server(80);

void setup(void) {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("");

// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(200, "text/plain", "Hi! I am ESP32.");
});

AsyncElegantOTA.begin(&server); // Start ElegantOTA
server.begin();
Serial.println("HTTP server started");
}

void loop(void) {
AsyncElegantOTA.loop();
}
Could you help me?

thanks

Not Rebooting, also cannot use setID

I am getting a page saying success, although I can see my code hasn't updated. Possible to include a manual reboot button?

also, cannot use ElegantOTA.setID("abcd123"); .. or AsyncElegantOTA.setID("abc");
would be really useful to be able to enter a string to show the code version

Not compiling in Arduino IDE

After adding #include <AsyncElegantOTA.h> it doesn't compile anymore.

Maybe relevant info: I am using WebSockets.

I get this:

c:/users/nmika/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\nmika\AppData\Local\Temp\arduino-sketch-393435F02AC9FC2C1FFA53DAE9EA71CC\libraries\WebSockets\WebSockets.cpp.o: in function WebSockets::base64_encode(unsigned char*, unsigned int)': c:\Users\nmika\Documents\Arduino\libraries\WebSockets\src/WebSockets.cpp:577: undefined reference to sha1(String const&, unsigned char*)'
c:/users/nmika/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\nmika\AppData\Local\Temp\arduino-sketch-393435F02AC9FC2C1FFA53DAE9EA71CC\libraries\WebSockets\WebSockets.cpp.o: in function WebSockets::acceptKey(String&)': c:\Users\nmika\Documents\Arduino\libraries\WebSockets\src/WebSockets.cpp:582: undefined reference to sha1(String const&, unsigned char*)'

Update is failing for nodemcu esp8266

I am getting this error when I am trying to upload .bin using this library.

Board : NodeMCU ESP8266

In prettified js file
Failed to load resource: net::ERR_CONNECTION_RESET

In console
POST http://192.168.1.50:8080/update net::ERR_CONNECTION_RESET (anonymous) @ update:formatted:5150 Promise.then (async) uploadOTA @ update:formatted:5146 re @ update:formatted:1183 r @ update:formatted:1313 Ko.i._wrapper @ update:formatted:3450

[HTTP ERROR] Bad Request at the end of updating

I'm getting "[HTTP ERROR] Bad Request" warning after percentage of load bar went to 100%. I can't locate the issue. I'm using example code on esp8266, bin file creates using PlatformIO
image
In addition after hitting Retry button or randomly at first upload im getting Exception (29): A store referenced a page mapped with an attribute that does not permit stores

In about 50% of the cases I get "[HTTP ERROR] Bad Request"

When using AsyncElegantOTO and ESP32 Dev Board, in about 50% of the cases I get "[HTTP ERROR] Bad Request" on the upload page after uploading the bin.

I installed version v2.2.5

I found the same issue under #31 - it appears that it was fixed in version v2.2.4 and may be, it is back now.

I tried to downgrade to version v2.2.4 in Arduino IDE. It was impossible to compile the code - it threw out tons of error messages that things were not declared (the type of endless messages one gets if you e.g. forgot to end a comment part of your code ... so, all in all, it is a fantastic tool if it works, but currently very unpredictable/unreliable.

When it fails I get the following output in serial: Nothing of this comes from me - dies MD5 Check come from ElegantOTA?

I use a watchdog timer - it seems that it does trigger .... even though have set it to 10 minutes (and this happens all in less than a minute), the wdt is set up as follows:

#include <esp_task_wdt.h>
#define WDT_TIMEOUT 10*60 //WDT timeout in seconds

MD5 Check Failed
E (167233) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (167233) task_wdt: - loopTask (CPU 1)
E (167233) task_wdt: Tasks currently running:
E (167233) task_wdt: CPU 0: IDLE0
E (167233) task_wdt: CPU 1: loopTask
E (167233) task_wdt: Aborting.
abort() was called at PC 0x400ec1a7 on core 0

Backtrace: 0x4008f4a4:0x3ffbe170 0x4008f6d5:0x3ffbe190 0x400ec1a7:0x3ffbe1b0 0x40087a8d:0x3ffbe1d0 0x4018110b:0x3ffbc260 0x400ed59e:0x3ffbc280 0x4008d3ad:0x3ffbc2a0 0x4008bbb9:0x3ffbc2c0

Rebooting...
ets Jun 8 2016 00:22:57

In the about 50% where it works, I do not get the MD5 Check Failed error, but I still see the wdt-trigger

Update failure with ESP32Cam

I've tested my sketch first and then your sample sketch, it always gives me 5% or even 0% error with an unexpected controller restart.

This is the error that appears in the terminal:

`IP address: 10.0.10.33
HTTP server started
abort() was called at PC 0x400e74fd on core 1

Backtrace: 0x4008efe0:0x3ffca850 0x4008f211:0x3ffca870 0x400e74fd:0x3ffca890 0x4008249f:0x3ffca8b0 0x400dfa9d:0x3ffca8d0 0x400df76c:0x3ffca8f0 0x400df9b7:0x3ffca910 0x400d221e:0x3ffca930 0x400d231d:0x3ffca980 0x401700a5:0x3ffca9c0 0x4016fdad:0x3ffcaa10 0x400d3bdb:0x3ffcaa40 0x400d5411:0x3ffcaaa0 0x400d55f9:0x3ffcaaf0 0x4014db85:0x3ffcab10 0x4014dbcd:0x3ffcab50 0x4014df2a:0x3ffcab70 0x4008af7d:0x3ffcaba0

Rebooting...`

I am using an ESP32Cam

Cannot upload spiffs.bin

It is a pretty clean design, and I like it. I can upload xxxx.ino.bin without problems, however, I can't seem to be able to upload xxxx.spiffs.bin using the web interface.

I recall in the very original OTA examples (not ElgantOTA), one must stop the SPIFFS before upload spiffs.bin. I wonder if this is the cause of this bug?

mistake in example code

Hello,
I think there is a mistake in the code:

  AsyncElegantOTA.begin(server);    // Start ElegantOTA

I think it should be:

  AsyncElegantOTA.begin(&server);    // Start ElegantOTA

Not compiling with latest Arduino IDE

The Project is currently not compiling.
Due to my analysis so far it seems the compiler is not able to handle the definition of ELEGANT_HTML[] in one single line, leading to quite bogus compiler errors.

Addition:
I somehow don't really get what the issue is.
Clear is: it is caused by the definition of ELEGANT_HTML[]. Whenever that is included in the beginning of the project - where it is supposed to be - all kinds of bogus errors regarding undefined functions (from my project) are thrown.
When I add the include at the very end of my sourcecode, it compiled.

More additions:
Right now I got the impression that there is some far/near addressing issue within the IDE/Compiler.
But honestly - no idea how to nail that down now .....

What I see:

When I have
`
#ALL KINDS OF INCLUDES
#include<AsyncElegantOTA.h>
void setup()
{
// some code
}

void loop()
{
// some code
}

// plenty of other functions of my project
`
Building fails with the error that several of the other functions are not defined.

When I put setup() and loop() to the end: no problem.
When I use the original setup without AsyncElegantOTA.h: no problem.

No reboot after upload

Thanks for this and it works well on my ESP32 WROVER based module!

Two things:

  1. Is it supposed to reboot/reset after a successful upload? Right now, I can upload the firmware remotely, but then have to cycle the power or find the reset button. It may be intentional to allow people to judge, but I could see having the option (either via code or a checkbox on the WebUI) to reset after successful flash.

  2. The examples have calls to AsyncElegantOTA.loop(); in the loop. I'm a little confused because a) this uses the async web server, so not sure why it would require some sort of polling and b) I did not add that to my loop and things are working great!

Is that AsyncElegantOTA.loop(); call required or left-over from perhaps before the async web server logic?

Bug in App.vue

Missing semi-colon at line 242 which results in build failure unless you use the '--fix' flag

(I've added the semi colon screenshot - it's just to show where it's missing & I added)

Screenshot 2020-09-11 at 01 50 52

[How to] Automatically upload a bin firmware file?

Hello,
For my project, I am using an android app to download a .bin update file from a remote server and I want to upload it to the ESP8266 via my custom android App.
Can you please share what is GET or POST method so that I can programmatically push the firmware file instead of using WebBrowser UI?

Thanks for the awesome library!

Cannot upload via ArduinoIDE

When using the original OTA library examples, I can always upload the code via WiFi from ArduinoIDE to an ESP8266.

However, with ElegantOTA, even ArduinoIDE sees the IP under ports, it failed to upload OTA. Any ideas?

Hash.h: No such file or directory in Arduino IDE

Hello!

I receive an error in Arduino IDE during example compilation: Hash.h: No such file or directory. (https://github.com/ayushsharma82/AsyncElegantOTA/blob/master/examples/ESP32_Async_Demo/ESP32_Async_Demo.ino)
The only Hash.h I have is in esp8266 SDK.
Also I receive warnings Multiple libraries were found for "AsyncTCP.h",Multiple libraries were found for "ESPAsyncWebServer.h",Multiple libraries were found for "AsyncElegantOTA.h"
How to fix it?

Upload and Always Blue Light On After This Library

Hello all ,

After I added this library - my Nodemcu v3 always showed blue light on and didn't allow me to upload new code. It looks like it stucked on loop and I can't do anything on this . Is there someone who have any idea or experience about this ?

OTA froze halfway 56% and ESP8266 resets

I did an OTA halfway 56% and froze. I did it again and stuck at 40%. But after trying the third time the ESP8266 is not resetting anymore.
So I tried to using serial loading of firmware
Failed to write to target RAM. Only got 1 byte status response.
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header.

I guess moral of the story is make sure when you do OTA you have good signal of Wifi.

This program works, but do not froze halfway and don't do it again when it froze halfway or you will brick it.

*********Update after an hour.
The ESP8266 did not got bricked. It is still functional when reset, but when I tried to use the serial firmware upload
it says
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
the selected serial port _
does not exist or your board is not connected

The power is 3.5VDC. My serial converter works with other ESP8266. Looks like the serial is broken?

***************Update after 2 hours
Below is the stack trace while doing the OTA

Exception (9):
epc1=0x402141d6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000002e depc=0x00000000

stack>>>

ctx: cont
sp: 3ffff9c0 end: 3fffffc0 offset: 01a0
3ffffb60: 00000000 00000000 00000000 00000000
3ffffb70: feefeffe 0000000c fe3020fe feefeffe
3ffffb80: feefeffe feefeffe feefeffe feefeffe
3ffffb90: feefeffe feefeffe feefeffe feefeffe
3ffffba0: 00efeffe feefeffe feefeffe feefeffe
3ffffbb0: feefeffe feefeffe 00000000 feefeffe
3ffffbc0: 3ffffd70 3ffffd60 00000004 3ffe8300
3ffffbd0: feefeffe 00000009 00000001 feefeffe
3ffffbe0: feefeffe feefeffe feefeffe 00000000
3ffffbf0: 00000000 3ffe8300 000000a0 40211b31
3ffffc00: 3ffffcbc feefeffe 00000093 ffff0208
3ffffc10: 3ffffcb0 0000009f feefeffe feefeffe
3ffffc20: feefeffe feefeffe feefeffe feefeffe
3ffffc30: feefeffe feefeffe feefeffe feefeffe
3ffffc40: feefeffe feefeffe feefeffe feefeffe
3ffffc50: feefeffe feefeffe feefeffe feefeffe
3ffffc60: feefeffe feefeffe feefeffe feefeffe
3ffffc70: feefeffe 3ffffd90 3ffffcb0 40211b74
3ffffc80: 3ffffd70 3ffffd60 00000004 feefeffe
3ffffc90: feefeffe feefeffe feefeffe feefeffe
3ffffca0: feefeffe feefeffe feefeffe 4020be50
3ffffcb0: 6378450a 69747065 28206e6f 401003c5
3ffffcc0: feefeffe 0000000c 00000000 40100196
3ffffcd0: 40100535 00000000 3ffe97a1 40100524
3ffffce0: c0037035 3ffecdc0 3ffefbc4 00000001
3ffffcf0: 00000000 00000000 0000001f 4010023c
3ffffd00: 3fffc200 0000000c 3fffc228 4010541d
3ffffd10: 4000050c 00000030 0000001f 40100524
3ffffd20: 00000000 00000000 0000001f 000000fa
3ffffd30: 00000274 00000001 40104ac5 3ffed818
3ffffd40: 3ffed7a0 00000000 00000020 4010023c
3ffffd50: 3ffffd70 3ffffd60 00000004 000000f0
3ffffd60: 00000002 00000003 4020bc1f 00000000
3ffffd70: 00000000 4020bcd4 00000002 401018cc
3ffffd80: 3ffe9652 40104b5f 00000000 4020bfdc
3ffffd90: 00000000 40103d3a 3ffed818 3ffed818
3ffffda0: 00000002 00000003 4020bc1f 00000000
3ffffdb0: 00000000 4020bcd4 00000000 3ffed818
3ffffdc0: 40252cc0 4020bc1f 00000000 00000000
3ffffdd0: 00000000 4020bcd4 00000000 402371e3
3ffffde0: 00000002 00000003 4020bc1f 00000000
3ffffdf0: 00000000 4020bcd4 00000000 40104e82
3ffffe00: 40104e64 3fffc100 3ffef0d4 00000003
3ffffe10: 00000003 4020bc1f 00000000 40100524
3ffffe20: 400005e1 2c9f0300 4000050c 3fffc278
3ffffe30: 4020bc1f 00000030 0000001c 00000001
3ffffe40: 40203a87 00000064 4020bccc 00000000
3ffffe50: 00000000 00000000 00000000 fffffffe
3ffffe60: ffffffff 3fffc6fc 00000274 3fff088c
3ffffe70: 00000000 3ffef0d4 3ffef3b4 00000003
3ffffe80: 00000000 3ffef0d4 3ffef3b4 00000030
3ffffe90: 40000ea3 00000023 00000001 00000001
3ffffea0: 3fffdab0 00000000 3fffd9d0 3ffef3b4
3ffffeb0: 00000000 00000000 00000001 00000020
3ffffec0: 00000000 3fffdad0 3ffef3b4 00000030
3ffffed0: 3fffdab0 00000000 3fffd9d0 3ffef3b4
3ffffee0: 00000000 00000000 00000001 3ffef374
3ffffef0: 00000000 3fffdad0 3ffef3b4 00000030
3fffff00: 00000000 3fffdad0 3ffef3b4 00000030
3fffff10: 00000000 4bc6a7f0 f78d4fdf 00000000
3fffff20: 00000000 00000000 4bc6a7f0 00000000
3fffff30: 3ffe84f8 3ffef1fc 40100334 000062b0
3fffff40: 3fffdad0 00000000 3ffef0d4 40202586
3fffff50: 00721c9e 2102a8c0 4020d808 4020d7f4
3fffff60: 007a1200 0f027299 feefef00 3ffef3b4
3fffff70: 00000000 00000001 3ffeef50 40209468
3fffff80: 00000000 00000000 00000001 3ffef3b4
3fffff90: 3fffdad0 00000000 3ffef374 402027ed
3fffffa0: 3fffdad0 00000000 3ffef374 4020bcec
3fffffb0: feefeffe feefeffe 3ffe851c 40100f91
<<<stack<<<

OK on ESP8266 but not on ESP32

I can't get this OTA to work on ESP32. Compiles OK and interface comes up but upload stalls and fails after about 10% progress and serial shows an abort is called on core 1.

Arduino environment 3MB/1MB flash split. Compiled binary in 1.1MB

So I thought I'd try using the example code. First issue I got was missing Hash.h. Tried commenting that include out and compiled ok, but behaved as before with abort and stall. I don't know whether missing Hash.h out could be associated with that but I would have expected a compile error of it was actually being used.

I have checked my ESP8266 and ESP32 environments. ESP8266 does indeed have the Hash library but ESP32 does not.

I have also verified that this does run fine on my ESP8266 set up.

How to compile/build own "elegantWebpage.h"?

I download ElegantOTA as the readme says the source is there....
I'm on MacOSX - the only part that refuses to run is 'npm run lint' - which I'm hoping isn't the final build part as no matter what I do, it always fails saying vue-cli-service command not found despite me adding required PATH variables and uninstalling and reinstalling vue/cli 10 times!

How to I 'compile' the source and create the .h file?

Custom function calls stop working (Version 1.06)

As soon as use #include <AsyncElegantOTA.h> custom functions don't work.

This compiles fine:

void setup() {
  doStuff();
}
void doStuff() {}
void loop() {}

This gives a compile error: 'doStuff' was not declared in this scope

#include <AsyncElegantOTA.h>
void setup() {
  doStuff();
}
void doStuff() {}
void loop() {}

What am i missing? It only happens to me with the AsyncElegantOTA.h library.
Using master: same problem
V2: Threw some other errors in a quick test, and i didn't spend more time investigating for V2

Compile error: enum HTTPMethod{....} declared twice: in ESP8266WebServer.h and ESPAsyncWebserver.h

I am using a lib that uses ESP8266WebServer.h. The declaration of an enum in that lib apparently clashes with the one in ESPAsyncWebserver.h.

I have found a workaround for the same. Will put in a PR if you're okay?

Here's the log:

Executing task: C:\Users\home\.platformio\penv\Scripts\platformio.exe run <

Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (3.0.0) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.30000.210519 (3.0.0)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa 2.100200.0 (10.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 45 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoJson> 6.17.2
|-- <WiFiManager> 0.16.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <AsyncElegantOTA> 2.2.5
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESPAsyncTCP> 1.2.2
|   |-- <ESP Async WebServer> 1.2.3
|   |   |-- <ESPAsyncTCP> 1.2.2
|   |   |-- <Hash> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |   |-- <ArduinoJson> 6.17.2
|-- <ESP Async WebServer> 1.2.3
|   |-- <ESPAsyncTCP> 1.2.2
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson> 6.17.2
|-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio\build\nodemcuv2\src\main.cpp.o
Generating LD script .pio\build\nodemcuv2\ld\local.eagle.app.v6.common.ld
Archiving .pio\build\nodemcuv2\lib0f8\libArduinoJson.a
Archiving .pio\build\nodemcuv2\lib826\libAdafruit MCP23017 Arduino Library.a
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\BearSSLHelpers.cpp.o
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\CertStoreBearSSL.cpp.o
Archiving .pio\build\nodemcuv2\lib855\libPubSubClient.a
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFi.cpp.o
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:56:18: error: 'HTTP_GET' conflicts with a previous declaration
   56 |   HTTP_GET     = 0b00000001,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:29: note: previous declaration 'HTTPMethod HTTP_GET'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };    
      |                             ^~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:57:18: error: 'HTTP_POST' conflicts with a previous declaration
   57 |   HTTP_POST    = 0b00000010,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:50: note: previous declaration 'HTTPMethod HTTP_POST'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };    
      |                                                  ^~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:58:18: error: 'HTTP_DELETE' conflicts with a previous declaration
   58 |   HTTP_DELETE  = 0b00000100,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:83: note: previous declaration 'HTTPMethod HTTP_DELETE'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };    
      |                                                                                   ^~~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:59:18: error: 'HTTP_PUT' conflicts with a previous declaration
   59 |   HTTP_PUT     = 0b00001000,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:61: note: previous declaration 'HTTPMethod HTTP_PUT'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                                                             ^~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:60:18: error: 'HTTP_PATCH' conflicts with a previous declaration
   60 |   HTTP_PATCH   = 0b00010000,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFiAP.cpp.o
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:71: note: previous declaration 'HTTPMethod HTTP_PATCH'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                                                                       ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:61:18: error: 'HTTP_HEAD' conflicts with a previous declaration
   61 |   HTTP_HEAD    = 0b00100000,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:39: note: previous declaration 'HTTPMethod HTTP_HEAD'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                                       ^~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:62:18: error: 'HTTP_OPTIONS' conflicts with a previous 
declaration
   62 |   HTTP_OPTIONS = 0b01000000,
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFiGeneric.cpp.o
      |                  ^~~~~Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFiGratuitous.cpp.o

In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:96: note: previous declaration 'HTTPMethod HTTP_OPTIONS'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                                                                                                ^~~~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\AsyncElegantOTA\src/AsyncElegantOTA.h:21,
                 from src\main.cpp:9:
.pio\libdeps\nodemcuv2\ESP Async WebServer\src/ESPAsyncWebServer.h:63:18: error: 'HTTP_ANY' conflicts with a previous declaration
   63 |   HTTP_ANY     = 0b01111111,
      |                  ^~~~~~~~~~
In file included from .pio\libdeps\nodemcuv2\WiFiManager/WiFiManager.h:17,
                 from include/Wifi_Manager_Stuff.h:3,
                 from include/MQTT_Stuff.h:6,
                 from src\main.cpp:3:
C:\Users\home\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:19: note: previous declaration 'HTTPMethod HTTP_ANY'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                   ^~~~~~~~
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFiMulti.cpp.o
Compiling .pio\build\nodemcuv2\lib46f\ESP8266WiFi\ESP8266WiFiSTA-WPS.cpp.o
*** [.pio\build\nodemcuv2\src\main.cpp.o] Error 1
============================================== [FAILED] Took 18.73 seconds ==============================================
The terminal process "C:\Users\home\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.`





Password Hash

The user password for OTA Portal should be hashed using bycrypt or something else rather than plaintext inside the code

Do I need AsyncElegantOTA.loop();

Hello,

in the example you wrote into the void loop() AsyncElegantOTA.loop(); . But in the Documentation you say, I only need #include <AsyncElegantOTA.h> and AsyncElegantOTA.begin(&server); before server.begin(); . What is correct?

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.