Skip to main content

Module ota

Module ota 

Source
Expand description

Zigbee OTA upgrade images and a directory of them.

An OTA file (Zigbee OTA Upgrade cluster specification, section 11.4) starts with a header naming the manufacturer, image type and file version; a device downloads the whole file, header included, in blocks. Some vendors wrap the file in a prefix of their own, so the header is looked for in the first MAX_PREFIX bytes.

OtaStore indexes a directory of such files by header only and reads blocks from disk as devices ask for them, so an image never sits in memory whole.

Modules§

command
OTA cluster command ids.
status
OTA status codes.

Structs§

OtaHeader
An OTA file header.
OtaImage
One image file in the store.
OtaStore
A directory of OTA files (*.ota, *.zigbee, *.bin, *.ota.signed, or anything else with an OTA header).

Enums§

OtaError
An OTA file did not parse.

Constants§

CLUSTER
The OTA cluster.
MAGIC
The OTA file identifier.
MAX_IMAGE
The largest image accepted.
MAX_PREFIX
How far into a file the header may start.

Functions§

build
Build an OTA file: a header for manufacturer, image_type and file_version, then body. For tests and tools.