-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get status code from Esp OTA HTTP (IDFGH-13394) #14302
Comments
focus on this issue, wating for the reslut |
Thank you for reporting this issue. I attempted to reproduce the behavior on my setup by hosting a local Python-based server using python based server but I was unable to replicate the problem. Could you please share more details about your setup or any specific steps you followed that might help in reproducing the issue? This information will be crucial for us to investigate further. |
Yes, I can! My version of esp-idf is V5.1.2 I'm using this FOTA model for Esp: |
Hello @LouisMaiaDev , Could you please share the respective OTA image? I could not reproduce the issue using the image uploaded to Google Drive, which is approximately 960KB in size. Additionally, it would be greatly appreciated if you could share the patch detailing the changes you made to the file, as mentioned above. |
I have created a patch to address the issue. Please review it and let me know if this meets your requirements or if any additional changes are needed. api_to_get_last_status_logged.txt Thanks. |
Show, good! Very good @nileshkale123 ! |
Is your feature request related to a problem?
Running HTTP OTA for Esp, the "esp_https_ota_perform()" function does not return the status code. If you make a firmware image available on a host server and remove it, the function will show the log "File not found" but will continue to try to download the image. In fact, it is possible to notice that even when faced with this error, if you call the "esp_https_ota_get_image_len_read()" function after the "esp_https_ota_perform()" function you will notice that it will continue to return a value greater than 0; this doesn't make any sense, since there is no more image available on the server.
Describe the solution you'd like.
The solution is simple: create the public funtion esp_https_ota_get_status_code(esp_https_ota_handle_t * http_ota_handle) to allow get the last status code logged. This will allow the developer to make precise interventions in their code.
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: