• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Flash size for OTA updates

Q&A Forum › Category: ESP32 › Flash size for OTA updates
0 Vote Up Vote Down
Angeline Melchiors asked 1 year ago

I’m using ArduinoOTA library to update firmware by OTA on the ESP32.
I get the following message:
[ 96455][E][ArduinoOTA.cpp:252] _runUpdate(): Begin ERROR: Bad Size Given

 

PLATFORM: Espressif 32 (6.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 14.6% (used 47856 bytes from 327680 bytes)
Flash: [====== ] 59.4% (used 778593 bytes from 1310720 bytes)
 

The new firmaware is only 766kb, less than 20% from the flash memory.
What can I do?

Question Tags: ArduinoOTA, ESP32, Flash Memory, OTA, Thingsboard
12 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
What is exactly the example you’re using?
Regards,
Sara

0 Vote Up Vote Down
Angeline Melchiors answered 1 year ago

It’s available on:
https://github.com/a-melchiors/Teste_OTA_2.git
It’s inspired on https://wokwi.com/projects/370389277140643841, but I needed to adapt the ArduinoOTA.h and made some chages in the sequence from commands.

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Thanks for sharing.
Unfortunately, I’m not familiar with that sketch and I never encountered that error before when using OTA.
Does the original code work for you?
At the moment, I’m out of the office and I don’t have a way to test the project.
Regards,
Sara
 

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Thanks for sharing.
Unfortunately, I’m not familiar with that sketch and I never encountered that error before when using OTA.
Does the original code work for you?
At the moment, I’m out of the office and I don’t have a way to test the project.
Regards,
Sara
 

0 Vote Up Vote Down
Angeline Melchiors answered 1 year ago

No, the original code doesn’t work, it didn’t event tryed to do the update, just received the message and kept doing the same thing as before.
I used PlatformIO on VSCode.

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Maybe you’re starting with a bad example.
Did you check the examples provided by the library? It’s better to start from there.
Regards,
Sara

0 Vote Up Vote Down
Angeline Melchiors answered 1 year ago

It’s my next option.
But the code seems much more complex, and use the Expressif IDF, I’d never used it before, so I need to learn it first. I was looking for a faster option.
But, I’ll try it, and I’ll share here my results.
Thank you!!!

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

This is the most basic example: https://github.com/espressif/arduino-esp32/blob/master/libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino
 
It uses “Arduino” language.
 
Regards,
Sara

0 Vote Up Vote Down
Angeline Melchiors answered 1 year ago

Hi Sarah!
Thank you for your suggestion. I was working on other project, now I took this project back.
I tried to use the code on the link, but I wasn’t able to adapt it to use it with thingsboard.

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
I’m not familiar with Thingsboard, but if you describe the issue and errors that you get, maybe I can help.
Regards,
Sar

0 Vote Up Vote Down
Angeline Melchiors answered 1 year ago

So, I left my first code. I have an example from Thingsboard.org but it uses the ESP-IDF. Do you know if there is a tutorial, or something like that, to help me to convert a code from esp-idf to arduino code? Thank you.

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
No, unfortunately, I’m not very familiar with ESP-IDF code.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.