Rikke 03/08/2023 08:14 AMHello,
I noticed some varying Ota speeds on our toit devices, and decided to investigate the problem. The speeds would vary from 40 seconds to over 3 minutes. After i cleaned the SD card on the slow devices, it brought the time down to like 40 seconds.
I made some tests with the SD-card, by making big files and many files to see the impact on the Ota speed.
The files I made are in a folder being used by the device. I tried putting the files outside the working folder, but that did not change the Ota speed.
In conclusion: The amount of files present in a working folder slows down the device.
I have trouble finding out why this is the case.
- We are appending to a single file 0-3 times a second
- SPI clock is at 400 kHz
- The host
package is used to create a file stream to the 1 file
- The Ota data is received with http client
- Ota data is written with firmware.FirmwareWriter
writer