My ArduinoOTA library, which is based on Arduino's WiFi101OTA library, was created for upload from IDE. But in some scenarios as for example deployed sleeping battery powered devices it is better to have the update available for download by the device.
In advanced section of examples of the ArduinoOTA library you can find examples of sketch update over ...
Yes, 1MB is fine for OTA. There are, though, a few caveats when working with OTA that you must observe regardless of the flash size:
The maximum OTA program size is less than half the available flash size. Typically it is about 500kB. Two copies need to be stored in flash, plus the partition table and NVRAM. The rest of the flash on larger chips is most ...
The basic problem is that when you upload over OTA you don't upload the partition structure.
The ESP32's flash is split into a number of "partitions" or areas. It might look something like:
|BOOT|P|OTA Program 1|OTA Program 2| SPIFFS |
The boards.txt file configures what can be configured in the Arduino IDE for each board.
On my installation, this is found at
I found the section esp32cam.name=AI Thinker ESP32-CAM and changed the lines:
Things to check:
Partition arrangement selected. You have to make sure to keep the same partition arrangement between uploads.
Partition arrangement selected. You have to make sure that the partition arrangement you have chose supports OTA uploads.
You have to reset the ESP8266 manually after your USB upload. You can only do an OTA update to a sketch that ...
Basicly OTA supports the upload of *.bin files. Wether this contains compiled code or a filesystem (SPIFFS/LittleFS) is irrelevant. BUT The space for the OTA (partition) has to be min the size of the *.bin plus an overhead for processing. So with 4MB at all, you would need 2.5MB OTA for 1.5MB App/SPIFFS. To tweak partition sizes (or custom partitions) you ...
There is no need for an SD card.
You can write all relevant parameters into a file in SPIFFS (e.g. json if you like) before starting the OTA update. During initialization you read the file and set the parameters accordingly.
SPIFFS does not get erased when doing an update (at least that's true for the OTA library that I'm using). If it does get erased in ...
The ESP8266httpUpdate library wants to know in advance how large the file is before it starts downloading it. It wants to know this so it can tell, before trying to download (and program), whether or not there's enough space for it. If the size of the file isn't provided by the server it will report the error that you are seeing.
The size of the file is ...
The only timeout I can find is in the espota.py script itself. That is riddled with such lines as:
You would need to scour that program and change them all.
ArduinoOTA uses UDP for communication. Because of that it is unreliable (yes, that's a technical term). It doesn't have any form of retransmit / retry, so if a packet is lost ...
You are just throwing an unparseable stream of ASCII decimal representations of the binary data at your code, then writing that ASCII data verbatim to the flash. That can never work.
Instead you need to pick an ASCII representation of your data that is actually parseable (I would suggest sticking to HEX representation and always 2 digits, so represent 0x6 as ...
I am not familiar with OTA for ESP32 but with SAMD21 using ArduinoOTA library and there the download is not done over MQTT but HTTPS.
Link to download is sent over MQTT but that's where it ends, download over HTTPS, verification of received data using checksum and bytes count and once InternalStorage.apply() executed it swaps the program downloaded with the ...
I have compiled my own SDUBoot.ino with fixed SDU_START 0x2000 and for SODAQ Sara (boot/sodaq_sara.h). My sketch with #include "SDU.h" compiles successfully. The board package is also installed in Arduino (http://downloads.sodaq.net/package_sodaq_samd_index.json). Here my code with changes (base is SodaqCore-samd-1.8.6-sodaq from Github):
I assume you are the one creating the OTA update. If so, then why don't you just include a "signature" in the code that is the architecture, i.e. ESP8266 vs. ESP32 and then check for that in your updater code so that it will not install an update for the wrong CPU.
You can't not use FreeRTOS. The whole ESP-IDF is based around it. The Arduino setup() and loop() run in their own FreeRTOS thread.
If you "turn off" FreeRTOS then nothing will work.
Whatever that "template" is from it's of no use to you.
As stated in the comments by @Codebreaker007 using the ESP32 Wrover Module works and if you put the pin definitions inline in the app there isn't a problem
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
You do not have to go through the hassle with editing the boards.txt if you want to have OTA only if you do not need it or you want a custom partition scheme.
That said the OTA partition is always what is left so e.g. Med Spiffs App 1.9MB, Spiffs 190KB means 1.9 MB OTA partiton.The caveat is if you want to OTA a 1.8 MB App with 1 MB Spiffs that will NOT work....
I've found that when a flash fails with a space error, I've usually specified the wrong flash size option in Arduino (under Tools->Flash Size). Depending on the version of Arduino you're using, try picking the one with "No SPIFFS" or FS:none that matches the size of your flash memory. Once you make that change, recompile and reupload.