Does the download include the OTA header?
Most OTA files consist of an OTA header, a sub-element tag, and a single sub-element: The upgrade image. For firmware versions 100A and newer, the entire OTA file is sent to the client during an OTA Upgrade. However, for versions older than 100A, only the contents of the file's single sub-element should be sent—not the OTA header or the sub-element tag. This affects several fields in the upgrade process.
When dealing with these two methods it is useful to know the image offset of the OTA file—that is, the offset at which the upgrade image data actually begins. This can be calculated by taking the size of the OTA header—which can be parsed from near the beginning of the OTA file—and adding six bytes for the sub-element header: two bytes for the tag, four bytes for the length.
Command | Field |
Value when sending without header (pre-100A) |
Value when sending with header (100A and later) |
Notes |
---|---|---|---|---|
Query Next Image Response | Image size | The size of the upgrade image parsed from the first sub-element tag's length value, or the total size of the OTA file minus the image offset. | The total size of the OTA file. |
In either case, this is the total number of bytes that the client needs to download. This value should never be determined by reading the Total Image Size field from the OTA header, as that field contains incorrect information on most older firmware files. |
Image Block | File offset | This refers to the offset from the start of the upgrade image data—add the image offset to this value to get the offset into the OTA file. | This refers to the offset into the OTA file. |
|
Note For compatibility with older OTA upgrade servers, newer firmware versions support both methods for a firmware upgrade. File system upgrades only support the method corresponding to the installed firmware version, as described above. We recommend using the newer method where possible to ensure compatibility with future releases.