webserver to ota

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

webserver to ota

Postby burkulesomesh43 » Wed Dec 19, 2018 2:35 pm

Hi all,
I want to ota update by uploading file from webserver.
here is my html code for webserver->>

Code: Select all


"<!DOCTYPE html>"
"<html>"
"<body>"
"<form action=\"/cf\" method=\"post\" enctype=\"multipart/form-data\">"
    "Select image to upload:"
    "<input type=\"file\" name=\"fileToUpload\" id=\"fileToUpload\">"
    "<input type=\"submit\" value=\"Upload Image\" name=\"submit\">"
"</form>"
"</body>"
"</html>";
I upload bin file from webserver but dont know how to recieve it and use for ota update.
I used it with netconn_recv();
--
Somesh Burkule

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: webserver to ota

Postby fly135 » Wed Dec 19, 2018 5:32 pm

Use esp_https_ota in IDF. It ony takes about 4 lines of code.

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: webserver to ota

Postby burkulesomesh43 » Wed Dec 19, 2018 6:21 pm

fly135 wrote:
Wed Dec 19, 2018 5:32 pm
Use esp_https_ota in IDF. It ony takes about 4 lines of code.
Yes, but I want upload bin file by selecting it from system using webserver browse selection..
And as I upload it from webserver, the bin file should be uploaded to esp32 and used for ota.
So that I have to pass that file to ota write.
--
Somesh Burkule

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: webserver to ota

Postby chegewara » Wed Dec 19, 2018 7:34 pm


User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: webserver to ota

Postby fly135 » Thu Dec 20, 2018 3:27 pm

burkulesomesh43 wrote:
Wed Dec 19, 2018 6:21 pm
fly135 wrote:
Wed Dec 19, 2018 5:32 pm
Use esp_https_ota in IDF. It ony takes about 4 lines of code.
Yes, but I want upload bin file by selecting it from system using webserver browse selection..
And as I upload it from webserver, the bin file should be uploaded to esp32 and used for ota.
So that I have to pass that file to ota write.
Can you just get your web server to return a filename or URL to file on server? Then use 4 lines of code to do the OTA. I have a linux box running Apache that I OTA from all the time.

Who is online

Users browsing this forum: Bing [Bot], Gaston1980 and 110 guests