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?
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.
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
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
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.
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
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!!!
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
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.
Hi.
I’m not familiar with Thingsboard, but if you describe the issue and errors that you get, maybe I can help.
Regards,
Sar
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.