Asking for help!!! "OTA using web server"

tasaf1
Posts: 2
Joined: Fri Mar 15, 2019 8:54 am

Asking for help!!! "OTA using web server"

Postby tasaf1 » Fri Mar 15, 2019 9:15 am

Dear,
I use web server to send "*.bin" file, and use "post handler" to receive data.

Code: Select all

...
$.ajax({\
url: '/echo',
type: 'POST',
data: data
...

Code: Select all

httpd_uri_t echo = {
    .uri       = "/echo",
    .method    = HTTP_POST,
    .handler   = echo_post_handler,
    .user_ctx  = NULL
};
The app runs well when the size of bin file lower 200kb. But when i upload a larger file (700kb), "post handler" receives about 134 kb and stop, display "httpd_sock_err: error in send : 104"
Could someone help me please! Thanks so much!

tasaf1
Posts: 2
Joined: Fri Mar 15, 2019 8:54 am

Re: Asking for help!!! "OTA using web server"

Postby tasaf1 » Wed Apr 10, 2019 2:01 am

Where is the "file manager"? Can you help me!!!

ESP_Sprite
Posts: 2666
Joined: Thu Nov 26, 2015 4:08 am

Re: Asking for help!!! "OTA using web server"

Postby ESP_Sprite » Sat Apr 27, 2019 2:46 am

I think the guy is a spammer, hence his response not making much sense. I removed his post.

ESP_Anurag
Posts: 19
Joined: Fri Aug 31, 2018 5:37 am

Re: Asking for help!!! "OTA using web server"

Postby ESP_Anurag » Mon Jun 03, 2019 9:23 am

@tasaf1 Please refer to the file_server example which also features file uploading onto flash (SPIFFS partition) : https://github.com/espressif/esp-idf/bl ... ver.c#L283

There is a limit of 200KB on the upload file size. Increase it to allow uploading larger files. Also, note that the SPIFFS partition size is kept as 960KB, which you may need to increase if the OTA image is larger.

Who is online

Users browsing this forum: No registered users and 28 guests