Replies: 10 comments 3 replies
-
there is no checksum. |
Beta Was this translation helpful? Give feedback.
-
I have a firmware version number that gets updated when I add a new version to my server. Also, I can see that when I make edits to print statements, they do not show up on the serial monitor, indicating that the new version was never loaded on. However, I can see that the download occurs correctly because the size of the file matches the BIN output of the IDE. |
Beta Was this translation helpful? Give feedback.
-
you use InternalStorage directly? |
Beta Was this translation helpful? Give feedback.
-
No, I don't know what you mean by "InternalStorage". I am saving the downloaded file to a SPI Flash. I am then checking the size of the file, and comparing it to the "length" returned by the server. If they match, I proceed with the update. That all works fine. However, it appears that the bootloader portion isnt working properly. The file is not replaced on the hardware. |
Beta Was this translation helpful? Give feedback.
-
so you don't use the ArduinoOTA library at all. |
Beta Was this translation helpful? Give feedback.
-
Is the SDU library strictly for SD card? I am using Adafruit library which can be used with either an SD card or a SPI Flash. I figured because they both use SDFat library, they could be used interchangeably and the update would still work with the SDU library. |
Beta Was this translation helpful? Give feedback.
-
SDU library is just an array set to be prepended by the linker before your sketch. And that array is a compiled extra sketch which loads the binary from SD card, writes it to flash and hands over the execution to regular sketch. It knows nothing about your SPI flash or the Adaruit_SPIFlash libray. |
Beta Was this translation helpful? Give feedback.
-
Hi, I should clarify, when I say SPIFlash - I am using a Winbond W25Q128JVSIM flash memory in place of an SD Card (to save space). I think you pointed me to the right location. It looks like the SDU Library uses the following on (Line 49 SDUBoot.INO) to look for the update file on the SD Card. if (SD.begin(SDCARD_SS_PIN) && SD.exists(UPDATE_FILE)) { That file is actually on my SPI Flash, stored the same way. I should just need to point the SDU to look at my SPI Flash for the file, right? |
Beta Was this translation helpful? Give feedback.
-
right. you have to write and test the modified 'extras' sketch which will use the SPFlash library instead of the SD library. Then you have to convert the compiled binary of that sketch to an array of bytes in a .h file (there is some tool I found long time ago on Internet which can help with it). Then you create a library with that .h file and use it with your sketch. |
Beta Was this translation helpful? Give feedback.
-
but if you sketch is smaller the half of the internal flash memory, you can use it to store the update binary. see the OTASketchDownloadWifi example |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am running into an issue on my Arduino IOT 33 where the OTA downloads the file and I receive a 200 status code, but the file is not replaced on the device. The old file is loaded back on. Do you know why this is happening? Could it be check sum related? The performance is very inconsistent.
Joe
Beta Was this translation helpful? Give feedback.
All reactions