Code Monkey home page Code Monkey logo

Comments (5)

rppelayo avatar rppelayo commented on July 3, 2024

Hi,

Please use the ESP32 exception decoder tool to give you more info about that error. https://github.com/me-no-dev/EspExceptionDecoder

from webota-esp32.

pedros89 avatar pedros89 commented on July 3, 2024

Hi thank you for your reply. I will download the tool for debugging because it looks super useful, but finally after some time I have sorted it out.

I believe that the problem could be that I was connecting with "http://....." to my server but my server has https enabled with a certificate.

What I did was to use this example provided in the update library that is especially made for https. It is very important to format the certificate string as in the example with \n at the end of every line

To all people that get the error I got, if you have an https server use the example at this link
https://github.com/espressif/arduino-esp32/tree/master/libraries/Update/examples/HTTPS_OTA_Update

from webota-esp32.

woutput avatar woutput commented on July 3, 2024

Hi @pedros89 , I had the same issue but solved it:
In my case, the HTTP response was 301: Moved Permanently. I think that this is caused by the .htaccess file on my webserver. It was configured (by WordPress) to replace the unencrypted http:// by the encrypted https://
In my case the solution was simple: modify my URL (as #defined in HOST) to include the s in https:// so that no redirect was needed. After the change, the HTTP response was 200: OK
An improvement for the code that is hosted here would be to either: only accept HTTP response 200 or (even better) follow the 301 redirect.
I hope this helps.

from webota-esp32.

rppelayo avatar rppelayo commented on July 3, 2024

Will mark this issue as resolved

from webota-esp32.

pedros89 avatar pedros89 commented on July 3, 2024

Hello @woutput, thank you for pointing that out. In my case because of that error I had abandoned this webota library, in addition I needed to have https, only http was not secure enough for my application.
I have developed a repository that allows you to update both ESP App and ESP spiffs and this is the one I am using at the moment. I am finding that the code based on the official ESP32 idf OTA is very reliable. Feel free to look at this repository:
https://github.com/pedros89/ESP32-update-both-OTA-Firmware-and-OTA-SPIFFS-with-Arduino

from webota-esp32.

Related Issues (6)

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.